大约有 540 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0056 秒)
...ivate function beginLoad():void { Laya.loader.load("res/images/rank.json", Handler.create(this, onLoaded)); } private function onLoaded():void { trace("加载成功"); var c:Image = new Image("rank/country.png"); Laya.stage.addChild(c); } 以上是子域项目中加载图集和取资源的代码...
来源: Laya_社区 发布时间: 20180830
...将UI界面添加到舞台上 Laya.loader.load("./res/atlas/ui.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例化导出的UI类 var efc:ui.EffectAnimationDemoUI = new ui.EffectAnimationDemoUI(); //添加到舞台 Laya.stage.addChild(efc); } }new Main(); ``` 运...
来源: Laya2.0_文档 发布时间: 20210715
...r = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE,this,this.completeHandler); xhr.once(Laya.Event.ERROR,this,this.errorHandler); xhr.send("res/a.png","","get","arraybuffer"); } private completeHandler(data:Object):void{ //加载完成返回的data是arraybuffer; //......这里处理我们...
来源: Laya2.0_文档 发布时间: 20210714
... Laya.Sprite3D.load("res/prefabs/Conventional/SampleScene.lh", Laya.Handler.create(null, function(sp) { var layaMonkey2 = scene.addChild(sp); layaMonkey2.transform.localScale = new Laya.Vector3(4, 4, 4); ...
来源: Laya_社区 发布时间: 20211009
...画 Laya.loader.load(["res/fish_1/stand.atlas","res/fish_1/attack.atlas"], Handler.create(this, this.onAnimAtlasLoaded)); } } private function onAnimAtlasLoaded():void { testAnim1 = new Animation(); testAnim1.loadAnimation("res/fish_1/fish_1.ani"); Laya.stage.addChild(testAnim1); testAnim1.play(0,tr...
来源: Laya_社区 发布时间: 20180424
... xhr:HttpRequest = new HttpRequest(); xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.send("res/monkey2.png","","get","arraybuffer"); } private function completeHandler(data:Object):void { //加载完成返回的data是arraybuffer; //.......这里处理...
来源: Laya2.0_文档 发布时间: 20210714
... Laya.loader.load(this.skPath.replace(".atlas",".png"),Laya.Handler.create(this,function(bit){ var arr = Laya.Loader.getAtlas(this.skPath); arr.forEach(resUrl=>{ var tex = Laya.Loade...
来源: Laya_社区 发布时间: 20200317
...w GameUI (GameUI.ts:34) at SceneLoader.create (laya.core.js:22061) at EventHandler.__proto.run (laya.core.js:1385) at SceneLoader.__proto.event (laya.core.js:1156) at SceneLoader.__proto._checkNext (laya.core.js:15949) at SceneLoader.__proto.onOneLoadComplete (laya.core.js:16000) at EventHandler.__p...
来源: Laya_社区 发布时间: 20181227
...: "xx.zip", type:"ZIP",constructParams:["xx/xxx1.lh","xx/xxx2.lh"]}], Laya.Handler.create(this, () => { let player1 = Laya.loader.getRes("xx/xxx1.lh").clone(); let player2 = Laya.loader.getRes("xx/xxx2.lh").clone(); })); [/size][/code]高级 为了根据具体项目来定制压缩包的颗粒度...
来源: Laya_社区 发布时间: 20211227
...a.init(1100, 619, Laya.WebGL); Laya.loader.load("res/atlas/war.atlas",Laya.Handler.create(this,this.onLoaded),null,Laya.Loader.ATLAS); } private onLoaded():void{ this.ball = new Ball(); Laya.stage.addChild(this.ball); this.ball.x = Laya.stage.width / 2; this.ball.y = Laya.stage.height / 2; Laya.stag...
来源: Laya_社区 发布时间: 20171108