大约有 1,311 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0049 秒)
Laya_社区(1039) Laya2.0_文档(79) Laya3.0_文档(55) Laya_示例(51) Laya3.0_api(44) Laya2.0_示例(39) laya_api(2) Laya2.0_api(2)
预加载结束之后还是报lose skin private loadRes():void{ Laya.loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this, this.onAssetLoaded),Laya.Handler.create(this, this.onLoading, null, false)); } private onLoading(progress: number): void { console.log("加载进度: " + progress); } ...
来源: Laya_社区 发布时间: 20180314
...放置view,写了个例子,可以参考下:package { import laya.net.Loader; import laya.ui.List; import laya.ui.View; import laya.utils.Browser; import laya.utils.Handler; public class LayaAirDemo { private var list:List; public function LayaAirDemo() { Laya.init(Browser.width,Browser.height)...
来源: Laya_社区 发布时间: 20170626
...bgColor="#EEFFCC"; //预加载button的资源,用于tab的项皮肤 Laya.loader.load("button-4.png",Handler.create(this,onLoaded)); } private function onLoaded():void { //添加tab容器 var tab:Tab=new Tab(); Laya.stage.addChild(tab); for(var i:int=0;i<6;i++)//为tab容器添加button { var bt...
来源: Laya_社区 发布时间: 20170626
...怎么调用下载到本地的资源 cuixueying • 2017-05-18 17:10 Laya.loader.load可以对服务器的资源进行预加载,并缓存到本地,Laya.loader.getRes可以获取缓存下的资源文件! 我盼乙卯 • 2018-05-31 15:42 @cuixueying:请问这个缓存到本地是缓存到硬盘...
来源: Laya_社区 发布时间: 20170319
...j.com/api/player/auth/img?key=testpng oppo小游戏下 无法显示 Laya.loader .load( "https://sh.mudgj.com/api/playe ... ot%3B, Laya.Loader.IMAGE ) .then((res: Laya.Texture) => { let sp = new Laya.Sprite(); sp.texture = res; sp.pos(0, 200); this.addChild(sp); });无法正常显示 检查发...
来源: Laya_社区 发布时间: 20250818
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); //...
来源: Laya2.0_示例 发布时间: 20251209
...nMouseClick(): void { //使用Prefab,需要转换根节点为Dialog Laya.loader.load("resources/Prefab2D.lh").then(res => { let dlg: Laya.Dialog = res.create(); dlg.open(); }); } } 运行效果如下: (动图) 二、通过代码创建Dialog 在进行书写代码的时候,免不了通过...
来源: Laya3.0_文档 发布时间: 20251024
...00631用户 赞同来自: //加载IDE指定的场景 Laya.loader.load([{url:"minastc.config.json",type:Laya.Loader.JSON}],new Laya.Handler(this,function(){ this.astcconfig = Laya.loader.getRes("minastc.config.json"); for(var key in this.astcconfig...
来源: Laya_社区 发布时间: 20221013
...后_referenceCount不会变成0,2.0版本是正常的可以变为0 Laya.loader.load('resources/UI/role/mxxxx.png', Laya.Loader.IMAGE).then((res: Laya.Texture) => { let sp = new Laya.Sprite(); sp.texture = res; Laya.stage.addChild(sp); setTimeout(() => { sp.destroy() }, 1000); });重现代码...
来源: Laya_社区 发布时间: 20231130
...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load("res/logo.png",Handler.create(this,onLoaded)); } private function onLoaded():void { img=new Image(); img.skin="res/logo.png"; Laya.stage.addChild(img); Laya.timer.once(500,this,onClick); //Laya.stage.on(Event.CLIC...
来源: Laya_社区 发布时间: 20170704