大约有 165 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0038 秒)
Laya_社区(116) Laya3.0_文档(22) Laya2.0_文档(19) Laya2.0_api(4) Laya3.0_api(2) Laya2.0_示例(1) Laya_示例(1)
...载图集资源,加载成功后添加到舞台 Laya.loader.load("./res/atlas/ui.atlas",Handler.create(this,onLoaded)); } private function onLoaded():void { //实例导出的UI类 var efc:EffectAnimationDemoUI = new EffectAnimationDemoUI(); //添加到舞台 Laya.stage.addChild(efc); } } } ``` 运...
来源: Laya2.0_文档 发布时间: 20210715
...ader.load(AniConfPath, Handler.create(this, createAnimation), null, Loader.ATLAS); } private function createAnimation():void { var url:Array=; for(var i:int=1;i<30;i++) { if(i<10) { url.push("res/fighter/fighter/rollSequence000"+i+".png"); } else { url.push("res/fighter/fighter/rollSequence00"...
来源: Laya_社区 发布时间: 20160610
...#ffcccc"; //加载界面需要的资源文件 Laya.loader.load([{url: "res/atlas/comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { //实例UI界面 listP = new ListPageUI(); Laya.stage.addChild(listP); Laya.timer.once(1000,this,onAdd);//1000毫...
来源: Laya_社区 发布时间: 20170313
...样,就是图集的分辨率不对。附件已经给了,请注意res/atlas/comp.png 这张图的分辨率,比正确的图宽和高都多了像素 lookdczar • 2017-12-31 23:21 另外一个人也和我出现了一样的问题 https://ask.layabox.com/question/10105 lookdczar • 2017-12-31 23:3...
来源: Laya_社区 发布时间: 20171230
...n.FILENAME_VERSION); function beginLoad(){ Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(null, onLoaded)); }*/ function updateItem(cell, index) { cell.setImg(cell.dataSource); } function onLoaded(): void { var rankList = new Laya.List(); //rankList.sc...
来源: Laya_社区 发布时间: 20180507
...源是否已经加载完毕。 注意:cache参数只能对文件后缀为atlas的资源进行缓存控制,其他资源会忽略缓存,强制重新加载。 LoaderManager decodeBitmaps(urls:Array):void 解码Texture或者图集 LoaderManager event(type:String, data:* = null):Boolean 派发...
来源: Laya2.0_api 发布时间: 20190513
...a.stage.scaleMode = Stage.SCALE_FIXED_WIDTH; Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); console.log("myref-onloaded", testUI....
来源: Laya_社区 发布时间: 20170720
... private btn3: Laya.Button; // 按钮皮肤资源 private skins: string = "atlas/comp/button.png"; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skins).then(() => { this.createBtn(); this.createvbox();...
来源: Laya3.0_文档 发布时间: 20230922
... private btn3: Laya.Button; // 按钮皮肤资源 private skins: string = "atlas/comp/button.png"; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skins).then(() => { this.createBtn(); this.createHbox();...
来源: Laya3.0_文档 发布时间: 20230922
...: void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图1-2所示: (图1-2) 1.2 3D节点的基础使用 首先,如动图1-3所示,将场景中已经添加好的3D节点Cube拖入到@property暴露的属性入口中...
来源: Laya3.0_文档 发布时间: 20240809