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

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

1. Handler.create的回收问题 [ 100%]

Handler.create的回收问题 Handler.create的最后一个参数,官方解释是 once:Boolean (default = true) — 是否只执行一次,如果为true,回调后执行recover()进行回收,默认为true。可下面代码为什么结果是false? module laya { import Stage = Laya.Stage; impor...

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

2. Laya.Handler.create和new Laya.Handler有啥区别 [ 99%]

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

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

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

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

4. Laya.loader Progress回调形同虚设 [ 98%]

...2.png", "res/3.png", "res/4.png", "res/5.png", "res/6.png", "res/7.png" ], Handler.create(this, onLoaded),Handler.create(this, onProgress)); //Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded),Handler.create(this, onProgress)); } private function onProgress(v:Number):void { tra...

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

5. 使用Laya.Handler.create在方法体内this关键词无效 [ 98%]

使用Laya.Handler.create在方法体内this关键词无效   附件 : --> 2019-10-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 缨 赞同来自: 首先检查你的外部那个Init函数的this,然后再...

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

6. JS里面定义一个函数,无法使用Laya.Handler.creat回调 [ 96%]

JS里面定义一个函数,无法使用Laya.Handler.creat回调 代码运行到Laya.Handler.create时候提示onTxtLoad is undfine.请教应该怎么定义? export default class LocalTxt{ constructor() { LocalTxt.Instance = this; } onTxtLoad(aText){ console.info("dfasd"); } initTxt(){ Laya.load...

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

7. Laya.loader.create 加载进度问题 [ 96%]

... function ModelManager() { Laya.loader.create("res/Pipe/Pipe/a.lh", Laya.Handler.create(this, this.onCreateComplete()),Laya.Handler.create(this, this.onAssetsLoading)); } ModelManager.prototype.onCreateComplete = function () { console.log("onCreateComplete"); var pipe = Laya.loader.getRes("res/Pipe/...

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

8. Laya.loader.create中的progress回调好像不准确? [ 96%]

...,是一个模拟的进度值。。   progress的回调你用的是Laya.Handler.create吗?如果是的话里边的最后一个参数你是不是没有修改呢? 2018-03-21 0 9 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 jinfawu 相...

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

9. Laya.loader.create 进度回调函数执行两次 [ 95%]

...数执行两次 Laya.loader.create(["Main/SMain.ls","Role/Role.lh"],Laya.Handler.create(this,this.on3DComplete),Laya.Handler.create(this,this.onProgress,null,false)); Manager.prototype.onProgress = function(value) { console.log("value=="+Math.floor(value*100)+"%"); }   输出结果: 0.19186599730...

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

10. 游戏加载进度失效 [ 95%]

...url: "mileTxt.png", type: Laya.Loader.IMAGE } Laya.loader.load(asset, Laya.Handler.create(this, this.onLoaded),Laya.Handler.create(this,this.onLoading)); } onLoading(progress){ this.gameLoading.loadTxt.text="Loading..."+(progress*100)+"%"; } onLoaded() { this.cacheAnimation(); var waterBg = Laya.Spr...

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