大约有 520 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0075 秒)
...as方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Laya.Handler.create(this, this.onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置信息,在加载`.json`文件...
来源: Laya2.0_文档 发布时间: 20210714
...//atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置信息,在加载`.json`文件的...
来源: Laya2.0_文档 发布时间: 20210714
...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
...源成功后,执行onLoaded回调方法 Laya.loader.load(this.skin,Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //创建一个Button实例 var btn:Laya.Button = new Laya.Button(this.skin); //将Button添加到舞台上 Laya.stage.addChild(btn); //设置Button相关属性 bt...
来源: Laya2.0_文档 发布时间: 20210714
...n); Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame)); } private loadGame(): void { var resArray = [ { url: "res/atlas/lobby/create_room.atlas", type: Laya.Loader.ATLAS }, ...
来源: Laya_社区 发布时间: 20181208
...(600, 400); var url:String = "res/json/Sheet1.json"; Laya.loader.load(url, Handler.create(null, onJsonLoaded,[url]), null, Loader.JSON); } private static function onJsonLoaded(url:String,data:Object):void { var arr:Array = data.Sheet1; Laya.loader.clearRes(url); } 微信开发者工具中报错 Unex...
来源: Laya_社区 发布时间: 20180108
...。 ```typescript Laya.Mesh.load("res/threeDimen/Physics/table.lm", Laya.Handler.create(this, function(mesh) { //....省略中间 //读取导出的桌子模型 var table = scene.addChild(new Laya.MeshSprite3D(mesh)); //给桌子加刚体并且设置刚体属性 var rigidBody = table.addComponent(Lay...
来源: Laya2.0_文档 发布时间: 20210715
...01; private socket:Laya.Socket = null; private callbacks:any = {}; private handlers:any = {}; // Map from request id to route private routeMap = {}; private heartbeatInterval:number = 0; private heartbeatTimeout:number = 0; private nextHeartbeatTimeout:number = 0; private gapThreshold:number = 100; ...
来源: Laya_社区 发布时间: 20180119
...//加载引擎需要的资源 Laya.loader.load("res/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 = ...
来源: Laya2.0_文档 发布时间: 20210715
..."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目录新建一个Floor.js 开始编写代码 这里 我们想一下地板有哪些功能? 1、自身从...
来源: Laya_社区 发布时间: 20160728