• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 520 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0075 秒)

471. 图集制作与使用详解(TypeScript-IDE篇(TS)-使用IDE创作) [ 48%]

...as方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Laya.Handler.create(this, this.onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置信息,在加载`.json`文件...

来源: Laya2.0_文档 发布时间: 20210714

472. 图集制作与使用详解(ActionScript-IDE篇(AS3)-使用IDE创作) [ 48%]

...//atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置信息,在加载`.json`文件的...

来源: Laya2.0_文档 发布时间: 20210714

473. 请大家帮助优化一下这个抛物线的代码 [ 48%]

...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

474. Button属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 48%]

...源成功后,执行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

475. SCALE_FIXED_WIDTH适配屏幕的问题 [ 48%]

...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

476. 小游戏项目 加载有中文的json文件 报错 [ 47%]

...(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

477. 多种碰撞器形状(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 47%]

...。 ```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

478. socket大型项目回调 [ 47%]

...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

479. 多线程worker(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 46%]

...//加载引擎需要的资源 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

480. 【简单跑酷--JS版】---Lv.3 添加地板 [ 46%]

..."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