大约有 13 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0024 秒)
...载代码示例如下: 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_文档 发布时间: 20251010
... Laya; //有了@regClass(),才会被识别为script脚本类 @regClass() export class Script extends Laya.Script { //属性上面有了@property(),才会被识别为IDE里可暴露的属性,每一个属性只要需要暴露,上面就都需要加上@property()。 @property( { type : String } ...
来源: Laya3.0_文档 发布时间: 20251010
...分包的示例代码: 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_文档 发布时间: 20251010