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

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

841. 关于onFocus的问题 [ 64%]

...交 4 个回复 cuixueying 赞同来自: 你有给你的textInput.on(Laya.Event.Focus,this,this.onFocus)进行监听吗,如果有的话,可以把你的测试例子提供下,我们看下! 2017-08-01 0 0 分享 微博 QZONE 微信 akane01 赞同来自: 好像没有,请问怎么进行监听? ...

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

842. 怎么给List下的每个item中的button添加事件? [ 64%]

...tn); console.log(btn.id); } for(var i = 0; i < 5; i++){ btns[i].on(Laya.Event.CLICK,this,judge,[i]); } function judge(aa){ console.log("___________"+aa); } 我就是这么做的,结果打印出来全是4,前面的按钮被最后的一个覆盖,这是为什么?

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

843. 使用 addChild 加载界面后,绑定事件报错 [ 64%]

...uctor() {         super();          this.btnStart.on(Laya.Event.CLICK, this, this.startGame);     }      startGame(): void {         //Laya.Scene.open("GameView.scene");         if (!Main.gameView) {             Main.gameView = new GameView();  ...

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

844. [LayaAir3]Laya 2.x/3.x 演示项目中 Laya.timer.scale 和 Laya.SpineSkeleton.playbackRate 对部分骨骼加速不生效 [ 64%]

...pineAni.playbackRate(10); //侦听点击,换动画 this.spineBtn.on(Laya.Event.CLICK, this, this.changeAni); }第二,你通过Laya.timer.scale设置比较大的值,受限制是因为引擎中作了一些优化保护,让动画不至于播放过快。如果你想自己控制速度,我们也...

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

845. laya.d3.core.RenderableSprite3D_API3.0 [ 64%]

...ve addChild addChildAt addChildren addComponent addComponentInstance bubbleEvent callLater clearTimer clone contains destroy destroyChildren event frameLoop frameOnce getChildAt getChildByName getChildIndex getComponent getComponents hasHideFlag hasListener isAncestorOf off offAll offAllCaller on on...

来源: Laya3.0_api 发布时间: 20231115

846. 问题发起指南 [ 64%]

...击穿透的问题 关于适配采用showAll后留白部分的颜色问题 event自定义事件的问题 写了个边缘光的自定义shader,有很多问题,帮忙看一下 问题状态 最新活动: 2017-03-24 11:44 浏览: 1190 关注: 2 人 cuixueying • 2017-03-24 11:17 附件给你了,...

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

847. 请问如何给ui下所有的button加一个点击监听事件? [ 64%]

...听函数参数的target判断是不是button来做。 Laya.stage.on(Laya.Event.CLICK, this, function(res:Laya.Event){ if (res.target instanceof Laya.Button){ // click button } }) 2018-12-01 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人...

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

848. 音乐与音效的播放与控制(TypeScript-LayaAir基础篇(TS)-硬件设备相关) [ 63%]

...lay(0); //失去舞台焦点(切出游戏)的处理 Laya.stage.on(Laya.Event.BLUR, this, () => { _sound.stop(); }); //获得舞台焦点(切回游戏)的处理 Laya.stage.on(Laya.Event.FOCUS, this, () => { _sound.play(0); }); …… ``` ### 六、音乐与音效播放的完整示例 该示...

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

849. websocket请教下,服务器发送过来的数据怎么获取 [ 63%]

...et请教下,服务器发送过来的数据怎么获取 private openHandler(event: any = null): void { console.log(`平台 正确建立连接`); this.socket.send("getScore"); } private receiveHandler(msg: any = null,data): void { console.log(`接收到数据触发函数:` + msg); ////////////////////...

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

850. 有没有Loader预加载 相关的注意事项或者文档 在手机上问题有点多 [ 63%]

... onLoading, null, false), null, 1, true, sGameMark, false); Laya.loader.on(Event.ERROR, this, onError); 预加载资源添加了完成 进度 和失败监听  在手机上有时加载进度会卡在某个数值不动 不会触发加载失败 也不触发加载完成  请问有没有什么方法可...

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