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

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

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

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

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

2. 定时器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 96%]

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

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

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

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

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

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

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

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

6. TiledMap地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 67%]

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

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

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

8. 3D粒子 · LayaAir3.3 · 引擎文档 · LAYABOX [ 52%]

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

9. 3D粒子编辑模块 · LayaAir3文档 · LAYABOX [ 52%]

...("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_文档 发布时间: 20250104

10. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...x.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); 编译运行上面的代码,然后点击舞台可以看到,二维码已经显示到了舞台上,可以用手机扫下,发现手机已经...

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