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

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

1. 按钮组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Button }) public btn: Laya.Button; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.btn.scale(5, ...

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

2. 2D光遮挡器与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 86%]

...ss, property } = Laya; @regClass() export class LightOccluder extends Laya.Script { private spotLight: Laya.Sprite = new Laya.Sprite(); private background: Laya.Sprite = new Laya.Sprite(); private lightOccluder: Laya.Sprite = new Laya.Sprite(); private backgroundTexture: string = "resources/bg2.png"...

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

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

...IDE插件开发说明一、插件能力二、插件运行环境2.1 在Laya.Script中使用本地能力2.2 UI进程脚本和Scene进程脚本通讯的方式2.3 预览运行进程和UI进程的通讯方式三、制作编辑器UI四、程序化生成界面4.1 常用方法4.2 示例五、自定义Inspec...

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

4. WebSocket通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 78%]

...t { regClass } = Laya; @regClass() export class WebSocketDemo extends Laya.Script { private socket: Laya.Socket; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.socket = new Laya.Socket(); // 注册事件监听 this.socket.on(Laya.Event.OPEN, this, this.onSocke...

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

5. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 65%]

...代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件...

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

6. 通用发布设置 · LayaAir3.3 · 引擎文档 · LAYABOX [ 64%]

...下代码: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕...

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

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

...Class, property } = Laya; @regClass() export class TestSprite extends Laya.Script { // 用于显示鼠标点击的位置 @property({ type: Laya.Sprite }) public hit: Sprite; private _temp: Sprite; private _allAgent: Nav2DAgent[] = []; private findCompents(lists: any[], sprite: Sprite, componentType:...

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

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

... const { regClass, property } = Laya; @regClass() export class CameraMoveScript extends Laya.Script3D { /** @private */ protected _tempVector3: Laya.Vector3 = new Laya.Vector3(); protected lastMouseX: number = 0; protected lastMouseY: number = 0; protected yawPitchRoll: Laya.Vector3 = new Laya.Vecto...

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