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

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

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. 加载-加载序列 [ 99%]

...项目开发更高效。(function() { var Texture = Laya.Texture; var Handler = Laya.Handler; var numLoaded = 0; var resAmount = 3; (function() { Laya.init(500, 400); // 按序列加载 monkey2.png - monkey1.png - monkey0.png // 不开启缓存 // 关闭并发加载 Laya.loader.maxLoader = 1; Lay...

来源: Laya_示例 发布时间: 20240929

3. 加载-加载序列 [ 99%]

... = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMo...

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

4. 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

5. 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

6. 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

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

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

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

8. 内存优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 97%]

...3中的`Laya.Hanlder.create()`方法说明。 从对象池内创建一个Handler,默认会执行一次并立即回收。 也就是说,如果需要多次触发这个回调方法,那么就需要对`Laya.Hanlder.create()`方法中的`once`参数设置为`false`。或者用`new Laya.Handler()`的...

来源: Laya2.0_文档 发布时间: 20210715

9. 加载-错误处理和进度 [ 97%]

...nt = Laya.Event; var Loader = Laya.Loader; var Texture = Laya.Texture; var Handler = Laya.Handler; (function() { Laya.init(550, 400); // 无加载失败重试 Laya.loader.retryNum = 0; var urls = ["do not exist", "../../res/fighter/fighter.png", "../../res/legend/map.jpg"]; Laya.loader.load(urls, Ha...

来源: Laya_示例 发布时间: 20240929

10. 加载-错误处理和进度 [ 97%]

... = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Event = Laya.Event, Loader = Laya.Loader; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.align...

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