大约有 1,326 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0056 秒)
...ll let dialog = new laya.ui.Dialog(); dialog.name = 'Dialog' parentNode.addChild(dialog); let childNode = parentNode.getChildByName('Dialog'); childNode.show(); console.log(parentNode.getChildByName('Dialog')); // 结果为null 2016-09-13 添加评论 免费帖 --> 分享 微博 QZON...
来源: Laya_社区 发布时间: 20160913
...个UI实例 var plan = new ui.TimeLineUI(); //添加到舞台 Laya.stage.addChild(plan); //播放UI场景中的动画 plan.crashed.play(); }运行时发现ui变量不存在,打控制台打ui,Laya.ui,Laya.TimeLineUI均发现不存在,在文档中也搜到不TimeLineUI的文档,请问这个API...
来源: Laya_社区 发布时间: 20190217
...0;i<5;i++){ sp=new Laya.Sprite(); sp.index=i; Laya.stage.addChild(sp); } 类似这样遍历出来的sprite 我怎么给每个sprite添加一个点击事件获得对应的sp.index值呢! 2017-02-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀...
来源: Laya_社区 发布时间: 20170221
...所指的js模块是一个个单独的界面的话,你可以通过new 和addChild对这些模块进行添加(添加到舞台或者同一个js下的容器里),这些全是开发者自己来操控的!场景的切换就是新界面的添加和旧界面的移除。添加使用new 和 addChil...
来源: Laya_社区 发布时间: 20170424
...载背景1 var bg1 = new Sprite(); bg1.loadImage("war/bc.png"); Laya.stage.addChild(bg1); //加载背景2 var bg2 = new Sprite(); bg2.loadImage("war/bc.png"); //更改背景2 放在背景1的上面 bg2.pos(0,852); Laya.stage.addChild(this); Laya.timer.frameLoop(1,this,myLoop); } function myLoo...
来源: Laya_社区 发布时间: 20191017
...Mode = Laya.Stage.SCALE_FULL; // Laya.Stat.show(); this.scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; this.camera = this.scene.addChild(new Laya.Camera()) as Laya.Camera; this.camera.transform.position = new Laya.Vector3(0, 0, 5); this.camera.transform.rotate(new Laya.Vector3(0, 0, 0)...
来源: Laya_社区 发布时间: 20170321
...tempStringArray[i] + ".png"; img.loadImage(tempImageName, i * 30, 0); this.addChild(img); var poker = new Poker(img,tempImageName); poker.show(); // Laya.stage.addChild(img); } } return Panel1; }(ui.Panel1UI));[/i] 这是扑克类[i]/* * 补克类 */ var Poker = (function () { function Poker(img,tem...
来源: Laya_社区 发布时间: 20180130
...is.CIRCLE_WIDTH) >> 1, (this.DEF_SIZE - 20) >> 1, "#fff") this.addChild(this.$circleSprite) this.start() } public start() { this.timerLoop(2, this, this.draw) } public draw() { if (this.startY >= 270) { this.clearTimer(this, this.draw) } this.startY++ this.graphics.clear() this.graphi...
来源: Laya_社区 发布时间: 20180123
...ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加上这句正常,反之则异常 //_shape.cacheAsBitmap=true; pos(300,300); Tween.to(this,{rotation:360},3000); } override public function get width():Number{ return _shape.width; } override public fun...
来源: Laya_社区 发布时间: 20170124
...oaded():void { var btn:Button = new Button("res/button-1.png"); Laya.stage.addChild(btn); //创建隐藏的file并且把它和按钮对齐。达到位置一致,这里我们默认在0点位置; var file:Object = Browser.document.createElement("input"); //设置file的样式 file.style="filter:alp...
来源: Laya_社区 发布时间: 20180529