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

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

81. 回调函数... [ 73%]

回调函数... constructor(){ Laya.loader.load(this.skins, Handler.create(this, this.onUIAssetsLoaded)); } aaa() { } function onUIAssetsLoaded( this.aaa();//为什么回调函数不能调用,undefined } 2017-06-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

82. UI界面加载有哪些回调方法可用 [ 73%]

UI界面加载有哪些回调方法可用 Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); 类似于this.onLoaded函数,还有哪些生命周期相关的回调呢。 我想在UI完全加载完毕后,完成一些init操作,this.onLoad...

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

83. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 73%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.sta...

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

84. 异步加载一个UI对象时的问题 [ 73%]

...createChildren(); let assets = [ { url: "res/atlas/ui/shared.atlas", type: Loader.ATLAS }, { url: "res/atlas/ui/myview.atlas", type: Loader.ATLAS }, { url: "view/MyView.json", type: Loader.JSON }, ] Laya.loader.load(assets, Handler.create(this, this.onLoaded)); } private onLoaded():void { this.creat...

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

85. 如何给loadprogress传参数? [ 72%]

如何给loadprogress传参数? Laya.loader.load(myurl,Laya.Handler.create(this,this.loadComplete),Laya.Handler.create(this,this.loadprogress,["param"])); /** * 加载进度 */ private loadprogress(data:Array<any>):void{ console.log("加载进度: " + data);//加载进度: param }Laya.Handl...

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

86. 急急急,如何设置按钮点击加载ani [ 72%]

...复 Laya_Aaron 赞同来自: Alex Huang package {     import laya.net.Loader;     import laya.net.ResourceVersion;     import laya.utils.Handler;     import laya.webgl.WebGL;     import laya.utils.Mouse;     import laya.ui.Button;     import laya.display.Sprite;     i...

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

87. 怎么加载网络上的图片 [ 72%]

...ang 赞同来自: 1.设置baseUrl为:http://image.xxx.com/ 2. 使用Laya.loader.load("1.png",Laya.Handler.create(this,this.complete)); 3.//加载完成回调处理 complete():void{} 2018-05-17 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发...

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

88. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 72%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.Res,Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ this.img = new Laya.Sprite(); //获取图片资源,绘制到画布 this.img.graphics.drawTexture(Laya.loader.getRes(this.Res),1...

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

89. Handler.create的回收问题 [ 72%]

...his.h1 = Laya.Handler.create(this, this.loadPicComplete, null, true); Laya.loader.load("res/img/1.png", this.h1); } private loadPicComplete(): void { Laya.timer.once(2000, this, this.actT); } private actT(): void { this.h2 = Laya.Handler.create(this, this.loadPicComplete, null, true); console.log(th...

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

90. Laya.loader.load 教程代码出错 [ 72%]

Laya.loader.load 教程代码出错            package {     import laya.display.Text;     import laya.display.Sprite;     import laya.utils.Handler;     import laya.resource.Texture;     public class LayaSample {         private var img:Sprite ;         p...

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