• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 275 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0038 秒)

161. Skeleton如何出发鼠标点击事件? [ 63%]

...接创建动画 skeleton.load("anims/lhd/anim_lhd.sk"); skeleton.on(Laya.Event.CLICK,this,this.onEnterRoomLHD) 2019-06-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复被折叠 要...

来源: Laya_社区 发布时间: 20190609

162. 老师,请问一下如何在js代码中,动态的创建一个按钮(或者图片、lable)并添加到一个box中? [ 63%]

...utton("comp/btn_start.png","测试按钮"); bt.on(Laya.Event.CLICK, this, this.click); Laya.stage.addChild(bt); function click() { console.log("??????????"); } 点击之后没有翻译,按钮也没有点击的动画 cuixueying • 2017-04-24 11:07 我们测试是OK的...

来源: Laya_社区 发布时间: 20170421

163. 可视遮罩层Layer(JavaScript-3D基础(JS)-LayaAir3D之Camera) [ 63%]

...件 每一次点击切换一个显示层 this.changeActionButton.on(Laya.Event.CLICK, this, function(){ //清除所有图层 this.camera.removeAllLayers(); //计数自加一 this.layerIndex ++; //设置可视图层 this.camera.addLayer(this.layerIndex%4 + 1); //将地板图层加入,地板不参...

来源: Laya2.0_文档 发布时间: 20210715

164. 有没有SoundChannel的示例? [ 63%]

...undChannel = new SoundChannel(); SoundManager.addChannel(channel); _btn.on(Event.CLICK, this, soundClick); function soundClick(evt:Event){ alert("channel.isStoped:"+channel.isStoped); if (channel.isStoped){ channel.play(); }else{ channel.stop(); } } channel.isStoped输出是:undefined 2017-01-16 ...

来源: Laya_社区 发布时间: 20170116

165. hitArea用法问题 [ 63%]

...hitArea = closeRect;  // closeBtn 为 Laya.Button 实例 this.closeBtn.on(Event.CLICK,this,this.closeWin); private closeWin():void {     console.log("the window has closed..."); } 2017-09-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...

来源: Laya_社区 发布时间: 20170920

166. 可视遮罩层Layer(TypeScript-3D基础(TS)-LayaAir3D之Camera) [ 63%]

...件 每一次点击切换一个显示层 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { //清除所有图层 this.camera.removeAllLayers(); //计数自加一 this.layerIndex ++; //设置可视图层 this.camera.addLayer(this.layerIndex%4 + 1); //将地板图层加入,地板...

来源: Laya2.0_文档 发布时间: 20210715

167. addchild后,怎么去引用? [ 63%]

...lose_1.ani"); lose1.x=150; lose1.y=400; lose1.size(100,300); lose1.on(Laya.Event.CLICK,this.listP,this.play1); lose1.name="lose1"; this.listP.addChild(lose1); play1():void { console.log("111"); this.lose1.play(); //this._childs[5].play(); } 2017-10-25 添加评论 免费帖 --> 分享 微博 QZONE ...

来源: Laya_社区 发布时间: 20171025

168. sprite添加texture后,sprite无法触发点击事件? [ 63%]

...(IMG_RES[this.name])); Laya.stage.addChild(this.item);  this.item.on(Laya.Event.CLICK, this, () => { this.item.destroy(); }); 2017-08-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueying 赞同来自: ...

来源: Laya_社区 发布时间: 20170826

169. 3D场景跳转到2D场景问题 [ 63%]

... } onAwake(){ let btnOnce=this.getChildByName("btnOnce"); btnOnce.on(Laya.Event.CLICK,this,this.onClick); } onClick(e){ this.removeSelf(); let gameScene=new GameScene(); Laya.stage.addChild(gameScene); } } 求大佬教学 2019-09-03 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

来源: Laya_社区 发布时间: 20190903

170. 初学者的提问,如何在场景中获取到对象 [ 63%]

...         this.btn = this.owner;         this.btn.on(Laya.Event.CLICK,this,this.cli)                    }         cli(){         /// how to 获得text 对象,并改变text的值???     } 2020-04-12 添加评论 免费帖 --> 分享 微...

来源: Laya_社区 发布时间: 20200412