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

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

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

12. 内存优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 96%]

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

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

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

14. 加载-单一类型资源加载 [ 96%]

...。(function() { var Loader = Laya.Loader; var Texture = Laya.Texture; var Handler = Laya.Handler; (function() { Laya.init(550, 400); // 加载一张png类型资源 Laya.loader.load("../../res/apes/monkey0.png", Handler.create(this, onAssetLoaded1)); // 加载多张png类型资源 Laya.loader.load( ...

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

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

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

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

16. 加载-单一类型资源加载 [ 95%]

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

17. 内存优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 95%]

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

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

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

19. 游戏加载进度失效 [ 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

20. Laya.Handler.create 回调参数问题 [ 94%]

Laya.Handler.create 回调参数问题 var ape ; function Init() { Laya.init(400, 800, Laya.WebGL); Laya.stage.bgColor = "#999911";  ape = new Laya.Sprite();     Laya.stage.addChild(ape); var ag = ["lsd",ape,1,"str"]; ape.loadImage("../laya/assets/res/to1.png",0,0,0,0,Laya.Handler.create(this,...

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