大约有 520 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0065 秒)
...法 roleAni.loadAtlas("http://10.10.20.58/chicken/res ... ot%3B,laya.utils.Handler.create(this,function(){ //添加到舞台 Laya.stage.addChild(roleAni); roleAni.play(); })); 代码就这几行.... 2018-03-22 0 0 分享 微博 QZONE 微信 wdmingzi2 赞同来自: 只是单纯的调用加载...
来源: Laya_社区 发布时间: 20180322
...画 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
...dChannel: Laya.SoundChannel = Laya.SoundManager.playSound(url, loops, Laya.Handler.create(this, () => { resolve(soundChannel); }), soundClass, startTime); }); } 我使用Promise封装了一下音效播放,正常使用await播放没啥的问题,可以做同步异步转换,出问题是的使...
来源: Laya_社区 发布时间: 20180124
...t(); } private function init():void { Laya.loader.load("../res/zy/zy.json",Handler.create(this,onLoadedSource),null,Loader.ATLAS); } private function onLoadedSource():void { roleAni = new Animation(); playActions(); } 2、你打包图集的时候,.json文件的prefix键是没有值的,这个...
来源: Laya_社区 发布时间: 20170821
...把 Laya.Tween.to(letterText, { y : 300 }, 1000, Laya.Ease.bounceIn, Laya.Handler.create(this,this.changeColor,[letterText]), i * 100); 2017-11-22 0 0 分享 微博 QZONE 微信 liner1457387450 赞同来自: 恩恩,你写的这句是基本的用法,我想用tween API里complete()立即完成...
来源: Laya_社区 发布时间: 20171122
...d { //加载引擎需要的资源 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded)); } private function onLoad2():void { Laya.timer.once(2000, this, onLoaded); } private function onLoaded():void { //实例UI界面 //var testView:TestView = new TestView(); //Laya.stage.addChild...
来源: Laya_社区 发布时间: 20180525
...将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
... //加载引擎需要的资源 Laya.loader.load("../atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例UI界面 var testView:ui.test.TestPageUI = new ui.test.TestPageUI(); Laya.stage.addChild(testView); } } new LayaUISample; WorkerLoader.workerPath = "libs...
来源: Laya3.0_文档 发布时间: 20251010
...atlas方式图集使用示例 Laya.loader.load("./res/test/c1.atlas", Laya.Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置信息,在加载`.json`文...
来源: Laya2.0_文档 发布时间: 20210715
...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