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

大约有 15 项符合查询结果, 库内数据总量为 30,897 项。 (搜索耗时: 0.0054 秒)

1. 字体切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...虎兔龙蛇马羊猴鸡狗猪年快乐"; testFontClip.spaceY = 10; this.owner.addChild(clipnum); this.owner.addChild(fontClip); this.owner.addChild(testFontClip); this.owner.addChild(testClipNum); this.owner.addChild(clipnum1); } } 通常FontClip已经可以满足开发者的基本需求。如果...

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

2. UI运行时 · LayaAir3.3 · 引擎文档 · LAYABOX [ 89%]

... RuntimeScript; onStart() { // 获得场景的Runtime对象 this.ui = this.owner.scene as RuntimeScript; // Button添加鼠标事件,让Image不显示 this.ui.Button.on( Laya.Event.MOUSE_DOWN, null, ()=>{ this.ui.Image.visible = false; }); } } ui 属性直接从脚本中通过 this.owner.scene ...

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

3. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 74%]

.../Script1.ts @regClass() export class Script1 extends Laya.Script { declare owner : Laya.Sprite3D; } //TestCustomEditor.ts @IEditorEnv.customEditor(Script1) export class TestCustomEditor extends IEditorEnv.CustomEditor { declare owner: Laya.Sprite3D; onSceneGUI(): void { IEditorEnv.Handles.drawHemiSp...

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

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

...= Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Prefab }) private loadingScenePrefab: Laya.Prefab; private loadingScene: Laya.Node; constructor() { super(); } /** * 第一次执行update之前执行,只会执行一次 */ onSt...

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

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

...; } onEnable(): void { //设置初始速度 let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: any, contact: any): void { //如果被碰到,则移除子弹 this.owner.removeSelf(); } onUpdate(): void { //如果...

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

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

...vent.MOUSE_UP, this, this.mouseUp); this.camera = (<Laya.Camera>this.owner); } /** * 监听键盘事件 */ onUpdate(): void { var elapsedTime: number = Laya.timer.delta; if (!isNaN(this.lastMouseX) && !isNaN(this.lastMouseY) && this.isMouseDown) { Laya.InputManager.hasKeyDown(8...

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

7. 2D寻路 · LayaAir3.3 · 引擎文档 · LAYABOX [ 64%]

...建完毕,此方法只执行一次 onAwake(): void { let sprite = this.owner as Laya.Sprite; //sprite.cache = true; this._temp = new Laya.Sprite(); this.owner.scene.addChild(this._temp); this.findCompents(this._allAgent, sprite.scene, Nav2DAgent); } onMouseClick(evt: Laya.Event): void { let pos = ...

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

8. 使用3D摄像机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 57%]

...法,使用时重写覆盖即可 */ onStart(): void { this.camera = this.owner as Laya.Camera; if (this.target) { this.target.transform.position.cloneTo(this.curpos); this.delatpos = new Laya.Vector3(); } } /** * 每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponen...

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

9. 3D粒子 · LayaAir3.3 · 引擎文档 · LAYABOX [ 56%]

...wn(e: Event): void { var particle = Particle3D.Create(this.filePath); this.owner.addChild(particle); } //鼠标抬起后,会释放对象池 mouseUp(e: Event): void { Particle3D.ClearPool(this.filePath); } } Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间: 2025...

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

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

...wn(e: Event): void { var particle = Particle3D.Create(this.filePath); this.owner.addChild(particle); } //鼠标抬起后,会释放对象池 mouseUp(e: Event): void { Particle3D.ClearPool(this.filePath); } } Copyright ©Layabox 2022 all right reserved,powered by LayaAir Engine更新时间: 2025...

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