大约有 580 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0059 秒)
Laya_社区(372) Laya2.0_文档(74) Laya_示例(51) Laya2.0_示例(39) Laya3.0_文档(34) Laya3.0_api(8) Laya2.0_api(2)
...or() { //初始化引擎 Laya.init(800, 600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded)); } private onLoaded(): void { //实例化Panel组件 var panel: Laya.Panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0,...
来源: Laya2.0_文档 发布时间: 20210715
...要预加载 上一节有讲到 修改加载的地方 //加载图片 Laya.loader.load(["res/background.png", "res/m_background.png", "res/floor.png"], laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); 首先同样我们到runGame目录新建一个Fl...
来源: Laya_社区 发布时间: 20160728
... "resources/res/ui/input (3).png", "resources/res/ui/input (4).png"]; Laya.loader.load(this.skins).then( ()=>{ this.onLoadComplete(); } ); } private onLoadComplete(): void { for (var i: number = 0; i < this.skins.length; ++i) { var input: Laya.TextInput = this.createInput(this.skins[i]); input...
来源: Laya3.0_文档 发布时间: 20251010
...JSON.stringify(data.url)); if(mark == 4)//确认数据全部接收后 Laya.loader.load(["res/atlas/test.atlas", "test/1.png", "test/2.png", "test/3.png"],Laya.Handler.create(this,this.onComplete)); } }.bind(this)); }else { Laya.loader.load("res/atlas/test.atlas",Laya.Handler.create(this,this.onCompl...
来源: Laya_社区 发布时间: 20190307
... = Laya.Stage.ALIGN_TOP; Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.loader.load([{url:"res/atlas/comp.json",type:Laya.Loader.ATLAS}],Laya.Handler.create(this,this.loadComp)); } private loadComp():void{ var parent:ui.ParentViewUI = new ui.ParentViewUI(); Laya.stage.addChild(parent); //当注...
来源: Laya_社区 发布时间: 20170829
...est() { //初始化引擎 Laya.init(800,600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas",Handler.create(this,onLoaded)); } private function onLoaded():void { //实例化Panel组件 var panel:Panel = new Panel(); //给panel添加背景色 panel.graphics.drawRect(0,0,100,100,"#ffc...
来源: Laya2.0_文档 发布时间: 20210715
....create(null, function (res:any){ Laya.stage.addChild(res); })); //用Laya.loader的方式加载,加载后根节点是Scene2D Laya.loader.load('scene/Game.ls', Laya.Handler.create(this, this.onLoaded), Laya.Handler.create(this, this.onLoading)).then( (res)=>{ let scene = res.create(); //scene.s...
来源: Laya3.0_文档 发布时间: 20251010
...rt"); //加载指定的模型预制体,并添加到Scene3D场景内 Laya.loader.load("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //获得Animator this._animator = girl.getComponent<Laya.Animator>(Laya.Animator); }); this.on( Laya.Eve...
来源: Laya3.0_文档 发布时间: 20251010
...],建议开始页面单独建立文件夹打包) Laya.loader.load("res/atlas/gameUI.atlas",Handler.create(this,this.gameStart)); } 2018-01-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...
来源: Laya_社区 发布时间: 20180105
...function():void{ beginLoad(); }); private 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