大约有 396 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0076 秒)
...lass } = Laya; @regClass() export class ProtobufDemo extends Laya.Script { onEnable() { console.log("Game start"); } } 2.2 Protobuf示例脚本 引入了protobuf模块就可以直接在项目中使用了,这里我们写了一个简单的示例DEMO,完整代码如下: // src/ProtobufDemo.ts // ...
来源: Laya3.0_文档 发布时间: 20251010
...nInEditor来让组件在IDE内加载时也可以触发生命周期方法(onEnable、onStart等所有的组件脚本生命周期方法)。示例代码如下: const { regClass, property, runInEditor } = Laya; @regClass() @runInEditor //重点看这里,要放到类之前,@regClass()与@runInE...
来源: Laya3.0_文档 发布时间: 20251010
...置。 Node addChildren(... args):void 批量增加子节点 Node addComponent(type:Class):* 添加组件。 Node addComponentIntance(comp:Component):* 添加组件实例。 Node addInputChild(node:Node):NodeNode addLayer(layer:int):void 增加可视图层,layer值为0到31层。 BaseCamera ...
来源: Laya2.0_api 发布时间: 20190513
...ive activeInHierarchy alpha anchorX anchorY autoPlay blendMode cacheAs components count customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters frames globalRotation globalScaleX globalScaleY graphics height hideFlags hitArea index interval is3D isPlaying ma...
来源: Laya3.0_api 发布时间: 20231115
...加到舞台后 * 此方法为虚方法,使用时重写覆盖即可 */ onEnable(): void { } /** * 组件被禁用时执行,比如从节点从舞台移除后 * 此方法为虚方法,使用时重写覆盖即可 */ onDisable(): void { } /** * 销毁时执行 * 此方法为虚方法,使用时重...
来源: Laya3.0_文档 发布时间: 20251010
...alpha anchorX anchorY bgColor blendMode bold borderColor cacheAs color components customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters font fontSize globalRotation globalScaleX globalScaleY graphics height hideFlags hitArea html htmlParseOptions is3D ital...
来源: Laya3.0_api 发布时间: 20231115
...erarchy alpha anchorX anchorY blendMode bottom cacheAs centerX centerY components customRenderEnable dataSource destroyed disabled displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY graphics gray height hide hideFlags hitArea is3D isVertical...
来源: Laya3.0_api 发布时间: 20231115
...erarchy alpha anchorX anchorY blendMode bottom cacheAs centerX centerY components customRenderEnable dataSource destroyed disabled displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY graphics gray height hide hideFlags hitArea is3D isVertical...
来源: Laya3.0_api 发布时间: 20231115
...erarchy alpha anchorX anchorY blendMode bottom cacheAs centerX centerY components customRenderEnable dataSource destroyed disabled displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY graphics gray group height hideFlags hitArea is3D left mask...
来源: Laya3.0_api 发布时间: 20231102
...nWidth focus hitTestPrior mouseThrough name renderingEnabled screenAdaptationEnabled tag useRetinalCanvas ALIGN_BOTTOM ALIGN_CENTER ALIGN_LEFT ALIGN_MIDDLE ALIGN_RIGHT ALIGN_TOP FRAME_FAST FRAME_MOUSE FRAME_SLEEP FRAME_SLOW SCALE_EXACTFIT SCALE_FIXED_AUTO SCALE_FIXED_AUTO_LAYAME SCALE_FIXED_AUTO_LAY...
来源: Laya3.0_api 发布时间: 20231115