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

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

1. TiledMap地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...添加地图到Scene2D下 private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成的回调 private completeHandler(e: any = null): void { this.onLoaded(); } } 编译运行代码,效果如图3-3所示,说明地图已创建...

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

2. 组件脚本的内置方法 · LayaAir3.3 · 引擎文档 · LAYABOX [ 84%]

...owner.x, owner.y);//设置爆炸动画的位置,让其跟随方块 owner.removeSelf();//删除方块自身节点对象 Laya.SoundManager.playSound("resources/sound/destroy.wav"); } } PhysicsGameMainRT.instance.addScore(1); } else if (other.label === "ground") { //只要有一个盒子碰到地板...

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

3. 使用3D精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 82%]

...,也可以对节点做一些基础操作,比如删除掉自己方法 removeSelf() /** * 从父容器删除自己,如已经被删除不会抛出异常。 * @return 当前节点( Node )对象。 */ removeSelf(): Node { this._parent && this._parent.removeChild(this); return this; } ...

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

4. 3D粒子 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

...sPaused = true; } } } //粒子系统对象池回收 Recover(): void { this.removeSelf(); Pool.getInstance().recover(this._filePath, this); }; //彻底销毁清理一个粒子特效对象 Clean(): void { if (this.destroyed) { return; } this.Recover(); if (this._particle && !this._particle.des...

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

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

...sPaused = true; } } } //粒子系统对象池回收 Recover(): void { this.removeSelf(); Pool.getInstance().recover(this._filePath, this); }; //彻底销毁清理一个粒子特效对象 Clean(): void { if (this.destroyed) { return; } this.Recover(); if (this._particle && !this._particle.des...

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

6. 实体组件系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 68%]

... any, contact: any): void { //如果被碰到,则移除子弹 this.owner.removeSelf(); } onUpdate(): void { //如果子弹超出屏幕,则移除子弹 if ((this.owner as Laya.Sprite).y < -10) { this.owner.removeSelf(); } } onDisable(): void { //子弹被移除时,回收子弹到对象池,...

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