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

大约有 190 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0031 秒)

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_示例 发布时间: 20240930

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. 关于监听stage对象的FOCUS属性,手机home键切换时监听不到,怎么办? [ 73%]

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

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

36. 多个模块之间相互嵌套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

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

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

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

38. 在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

39. list的selectHandler属性连续点击同一个item不能重复接收事件 [ 68%]

...         this._selectedIndex=value;             this.changeSelectStatus();             this.event(/*laya.events.Event.CHANGE*/"change");             this.selectHandler && this.selectHandler.runWith(value);             this.startIndex=t...

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

40. Laya2.6 vscode 编译错误 [ 66%]

...译指令 layaair2-cmd compile,报错: [16:31:30] Working directory changed to E:\work\svn\layacore\code\TestLive2d\.laya [16:31:31] Using gulpfile E:\work\svn\layacore\code\TestLive2d\.laya\compile.js   C:\Users\Administrator\AppData\Roaming\npm\node_modules\layaair2-cmd\node_mo dules\_gulp@3...

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