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

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

31. 输入设备-摇一摇 [ 74%]

...e = Laya.Shake; Shake.instance.start(5, 500); Shake.instance.on(Laya.Event.CHANGE, this, this.onShake); console.text = '开始接收设备摇动\n'; } onShake() { const Shake = Laya.Shake; shakeCount++; console.text += "设备摇晃了" + shakeCount + "次\n"; if (shakeCount >= 3) { Shake.instance.s...

来源: Laya2.0_示例 发布时间: 20251130

32. List的selectHandler 点击同一个item只能触发一次回调 [ 74%]

...alue){ //if (this._selectedIndex !=value){ this._selectedIndex=value; this.changeSelectStatus(); this.event(/*laya.events.Event.CHANGE*/"change"); this.selectHandler && this.selectHandler.runWith(value); this.startIndex=this._startIndex; //} });

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

33. 陀螺仪和加速计使用问题 [ 73%]

陀螺仪和加速计使用问题 Laya.Gyroscope.instance.on(Laya.Event.CHANGE,this,this.onDeviceorientation);  Laya.Accelerator.instance.on(Laya.Event.CHANGE,this,this.onMotoin); 官网陀螺仪和加速计例子中的上面两句运行时都报 Cannot read property 'instance' of undefined 的错...

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

34. Native IOS下获取陀螺仪数据为0 [ 73%]

...标系。 //设置陀螺仪的处理 Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onOrientationChange);   private onOrientationChange(absolute:Boolean, info: Laya.RotationInfo):void         {             if (info.alpha === null)             {         ...

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

35. [LayaAir3]Laya.Slider 的结束拖拽的事件监听 怎么写, [ 73%]

..."aaa");         })     } 2025-07-11 0 1 分享 微博 QZONE 微信 Archangelᴱᴿᴵᑦ 赞同来自: this.owner.on(Laya.Event.CHANGE, this, () => { console.log("在拖着"); }); this.owner.on(Laya.Event.CHANGED, this, () => { console.log("松手了"); }); 2025-07-11 0 0 分享 微博 Q...

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

36. 关于监听stage对象的FOCUS属性,手机home键切换时监听不到,怎么办? [ 73%]

... stage监听FOCUS,必须要点击屏幕才能触发回调。VISIBILITY_CHANGE 这个属性又没有回调。 现在就是想实现监听屏幕舞台是否可见,要怎么实现呢?VISIBILITY_CHANGE 这个BUG还没解决吗 2018-03-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

37. 多个模块之间相互嵌套import,导致运行报错 [ 71%]

...触发'attack' 事件,而在Manager里监听attack事件,调用自已的change函数。 Animal.tsclass Animal implements EventEmiter { public sex: number = 0; public Create(): void {} public Attack(): void { this.emit('attack'); } } Manager.ts public CreateCat(): void { let self = this; let cat =...

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

38. [LayaNative3]2d示例程序构建发布打包后,在OpenHarmony运行闪退 [ 69%]

...C01406/WRAP: 01-06 17:34:41.530 1574 1809 E C01406/WRAP: [gles_fb_surfaces_changed_nx@mali_gles_fb_module_api_nx.cpp:227] sprddebug gles_fb_surfaces_changed_nx line=227, ctx=0x0x5effcfc260 01-06 17:34:41.530 1574 1809 E C01406/WRAP: 01-06 17:34:41.530 1574 1809 E C01406/WRAP: [gles_fb_surfaces_chang...

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

39. 最新版本 1.7.5 beta fontClip [ 68%]

...          }             }             event(Event.CHANGE);         } 2017-06-01 0 0 分享 微博 QZONE 微信 a13121527420 - 哇啦哇啦哇啦! 赞同来自: 其实最完美的就是可以布局,然后还可以在前后加描述问题, 例如: 1234万 , 金...

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

40. 在List渲染的时候,在滚动一个list的时候,如何实现另一个list也跟着滚动,并且两个list同时滚动一模一样。 [ 68%]

...交 2 个回复 非文 赞同来自: AIQR2013 侦听滚动list.scrollBar的CHANGE事件,触法事件根据滚动list.scrollBar的value值修改另一个list.scrollBar的value值 2018-05-15 1 0 分享 微博 QZONE 微信 AIQR2013 赞同来自: Aaron安 已经解决,谢谢! 注意点: 两个li...

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