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

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

1. Laya.timer.frameLoop(1, this, this.aaa);对象移动会出现颤抖现象 [ 100%]

Laya.timer.frameLoop(1, this, this.aaa);对象移动会出现颤抖现象 this.loadHp(); Laya.timer.frameLoop(1, this, this.aaa); private bb:number = 6; private playerHB:logic.UI.role.PlayerHealthBar; private loadHp():void { this.playerHB = new logic.UI.role.PlayerHealthBar(); this.playerHB.pivotX ...

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

2. 重发问题: 点击页面会导致setTimeout setInterval 延迟执行 [ 81%]

...该用requestAnimationFrame。 Laya本身带Laya.timer.loop和Laya.timer.frameLoop,前一个基于时间,后一个基于帧。按照楼主的需求,应该基于时间,但正因为loop是基于时间的,所以类似setInterval,虽然不会卡顿,但是会不流畅。所以当时我研...

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

3. 微信小游戏渲染开放域卡顿处理 [ 73%]

...舒服,自己封装的定时器,不想用可直接替换成Laya.timer.frameLoop来替代,请自行修改跟Timer相关代码。 module lie {     /**      * 定时器,可启动、停止及统计已运行时间(单位毫秒),默认启动      */     export class Timer {     ...

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

4. 使用方向键 控制精灵在格子中移动 [ 63%]

...keyup); Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown); Laya.timer.frameLoop(1,this,this.loop);事件响应 onkeyup(e){ for(let i:number = 0;i<this.keyList.length;i++){ if(this.keyList[i]==e.keyCode){ this.keyList.splice(i,1); break; } } } onkeydown(e){ if(this.keyList.indexOf(e.keyCode)&...

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