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

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

1. 定时器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...null, coverBefore: boolean = true, jumpFrame: boolean = false): void { var handler: TimerHandler = this._create(false, true, delay, caller, method, args, coverBefore); if (handler) handler.jumpFrame = jumpFrame; } 使用示例如下: const { regClass } = Laya; import { RuntimeScriptBase } from "./...

来源: Laya3.0_文档 发布时间: 20251010

2. 事件管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 98%]

...型 Laya.Event2.2 事件派发 Laya.EventDispatcher2.3 事件处理 Laya.Handler3. 自定义事件事件管理 1. 认识事件 1.1 什么是事件 事件Event指是由系统事先设定、能被对象识别和响应动作,事件是指对象对于外部动作响应,当对方发生...

来源: Laya3.0_文档 发布时间: 20251010

3. 缓动 · LayaAir3.3 · 引擎文档 · LAYABOX [ 91%]

...以避免因对象重用而引发问题。此外,新系统不再使用Handler,从而杜绝了Handler重用带来混乱。同时,改进后Tween系统支持更丰富选项以及串行和并行任务功能,为开发者提供更灵活强大工具来实现理想动画效果。 ...

来源: Laya3.0_文档 发布时间: 20251010

4. 获取位置信息 · LayaAir3.3 · 引擎文档 · LAYABOX [ 89%]

...BLE和Geolocation.TIMEOUT之一。 */ static getCurrentPosition(onSuccess: Handler, onError: Handler = null): void { Geolocation.navigator.geolocation.getCurrentPosition(function (pos: any): void { Geolocation.position.setPosition(pos); onSuccess.runWith(Geolocation.position); }, function (error: an...

来源: Laya3.0_文档 发布时间: 20251010

5. 3D场景环境设置 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

...nderer; //加载相机天空盒材质 Laya.Material.load("sky2.lmat", Laya.Handler.create(null, function(mat: any) { //修改天空盒渲染器天空盒材质 skyRenderer.material = mat; })); 2.3 IDE中创建天空盒 2.3.1 更改IDE默认球形天空盒 当我们用IDE场景一个3D场景时...

来源: Laya3.0_文档 发布时间: 20251010

6. 使用百度地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 79%]

...Geolocation.enableHighAccuracy = true; Laya.Geolocation.watchPosition(Laya.Handler.create(this, this.updatePosition), Laya.Handler.create(this, this.onError)); // 绑定convertToBaiduCoord作用域 this.convertToBaiduCoord = this.convertToBaiduCoord.bind(this); } } 由于本例不需要使用LayaAir...

来源: Laya3.0_文档 发布时间: 20251010

7. 场景管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...open(url: string, closeOther: boolean = true, param: any = null, complete: Handler = null, progress: Handler = null): Promise<Scene> { Scene.showLoadingPage(); return Scene.load(url, Handler.create(null, this._onSceneLoaded, [closeOther, complete, param]), progress); } (图2-1) 例如创...

来源: Laya3.0_文档 发布时间: 20251010

8. TiledMap地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 63%]

...is.tMap.createMap("resources/TiledMap/orthogonal.json", viewRect, new Laya.Handler(this, this.completeHandler)); } //添加地图到Scene2D下 private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成回调 private completeHa...

来源: Laya3.0_文档 发布时间: 20251010

9. 多线程Worker · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

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

10. 3D粒子 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...("Game start"); //加载粒子特效资源 Laya.loader.load(this.filePath, Handler.create(this, () => { })); } //每次鼠标点下屏幕后,会创建一个特效 mouseDown(e: Event): void { var particle = Particle3D.Create(this.filePath); this.owner.addChild(particle); } //鼠标抬起后,...

来源: Laya3.0_文档 发布时间: 20251010