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

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

1. 为什么官网例子里,UI组件的事件都new Handler,而资源加载Handler.create() [ 100%]

什么官网例子里,UI组件的事件都new Handler,而资源加载Handler.create() 为什么官网例子里,UI组件的事件都new Handler,而资源加载Handler.create()? 我测试了一下,如果类似于 tab.selectHandler = Laya.Handler.create(tab, this.onSelect); ...

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

2. AS中的回调函数为什么只能Handler创建? [ 95%]

AS中的回调函数为什么只能Handler创建? 比如一个主类: private var score:int; public function main():void {  new class(callback); } private function callback(num:int):void {   this.score = num;   var tmp:int = this.score;   trace(tmp); }     另外一个类:class.as ...

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

3. Timer Handler被覆盖 [ 94%]

Timer Handler被覆盖   class Timer   _getHandler(caller, method) { var cid = caller ? caller.$_GID || (caller.$_GID = ILaya.Utils.getGID()) : 0; var mid = method.$_TID || (method.$_TID = (Timer._mid++) * 100000); return this._map[cid + mid]; }   当游戏玩的功能多时间长了,随着cal...

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

4. Laya.Handler.create和new Laya.Handler有啥区别 [ 92%]

Laya.Handler.create和new Laya.Handler有啥区别 this.sList.mouseHandler = Laya.Handler.create(this, this.onMouse);//鼠标响应事件 this.sList.mouseHandler = new Laya.Handler(this, this.onMouse) ; // 鼠标事件响应. 2017-04-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

5. 关于new Handlerhandler.create的使问题 [ 92%]

关于new Handlerhandler.create的使问题 官方文档的内存优化章节中,提到了除了使new Handler来完成异步回调,还可以使handler.create的方式(该方法使了内置对象池管理),并且举了例子说明了create的好处。我想问的是,这...

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

6. list的Handler.create的点击事件第二次点击不生效 [ 92%]

list的Handler.create的点击事件第二次点击不生效 list.selectHandler = Handler.create(this,onRender, null, false);//滚动列表点击事件 private function onRender(index:int):void{ list.setItem(lastSelect,arrConver(lastSelect,false));//取消选中效果 list.setItem(index,arrConver(i...

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

7. Geolocation.watchPosition [ 90%]

Geolocation.watchPosition Geolocation.enableHighAccuracy = true; this.gps_handler = Handler.create(this, this.update_gps); this.failed_handler = Handler.create(this, this.gps_failed); this.watch_id = Geolocation.watchPosition(this.gps_handler, this.failed_handler); this.gps_handler 只会回调一...

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

8. Laya.loader.load("", Laya.Handler.create(this, this.console)); [ 90%]

Laya.loader.load("", Laya.Handler.create(this, this.console)); 为什么会打印两次 附件 : --> 2018-12-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: 加载两次 2019-05-11 0 0 ...

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

9. 关于缓动函数from的一些问题记录 [ 90%]

...rText.y = 400; Laya.Tween.from(letterText,{y:100},3,Laya .Ease.backOut,new Handler(this,this.onEaseComplete),1,null,true); function onEaseComplete(){ console.log("ease complete"); Laya.stage.addChild(letterText); } ``` 以上的代码主要存在三个问题: 1. from()中的duration和delay都是以...

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

10. 显卡驱动停止响应,且大概率蓝屏,原来是Handler惹的祸,但原因是什么 [ 89%]

显卡驱动停止响应,且大概率蓝屏,原来是Handler惹的祸,但原因是什么 问题来自于 http://ask.layabox.com/question/3673   谷歌浏览器直接崩,其他浏览器的话,也是CPU很高,操作窗口卡顿厉害   原因是一个run once = true的Handler,如果再...

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