大约有 149 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0068 秒)
...tAchieve.on(Laya.Event.CLICK, this.achievememtsettings); } // 每帧执行 onUpdate(): void { extendLib.steamCallback(); } onInit() { alert(extendLib.initializeSteam()); } achievememtsettings(): void { if (extendLib.initializeSteam()) { // 解锁成就 extendLib.setAchievement("NEW_ACHIEVEMENT_1_0")...
来源: Laya3.0_文档 发布时间: 20251010
....0中,Component具有完整的生命周期,即onAwake,onStart,onEnable,onUpdate,onLateUpdate,onDisable,onDestroy,不再使用_onEnable,_onDisable等下划线函数。 _onEnable,_onDisable等下换线函数仍然给内部使用 对比Component, Script增加了交互行为,即onTriggerEnter, o...
来源: Laya3.0_文档 发布时间: 20251010
...2D节点还是2D预制体的根节点,它们的Runtime是没有onStart、onUpdate、onLateUpdate方法的。 注意2:onOpened、onClosed方法是只有Scene2D节点的Runtime有,其它情况是没有的。 3.3 不同的使用UI组件方式 相比自定义的组件脚本,UI组件脚本可以...
来源: Laya3.0_文档 发布时间: 20251010
...s() export class Demo extends Laya.Script { spine3D: Laya.Spine3DRenderer; onUpdate(): void { // 获取世界位置 let worldPos = this.owner.transform.position; console.log(`Spine3D世界坐标: ${worldPos.x}, ${worldPos.y}, ${worldPos.z}`); // 获取屏幕坐标(用于点击检测等) let scre...
来源: Laya3.0_文档 发布时间: 20260203
...is.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(87) && this.moveForward(-this.s...
来源: Laya3.0_文档 发布时间: 20251010
...s.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouseWheel) } onUpdate(): void { if (Laya.Browser.onMobile) { this.AroundByMobileInput(); } else { this.AroundByMouseInput(); } if (!this.canRotation_X) this.targetAngles.y = 0; if (!this.canRotation_Y) this.targetAngles.x = 0; //Lerp. thi...
来源: Laya_社区 发布时间: 20190224
...s.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouseWheel) } onUpdate(): void { if (Laya.Browser.onMobile) { this.AroundByMobileInput(); } else { this.AroundByMouseInput(); } if (!this.canRotation_X) this.targetAngles.y = 0; if (!this.canRotation_Y) this.targetAngles.x = 0; //Lerp. thi...
来源: Laya_社区 发布时间: 20170714
...etComponent方法 * 此方法为虚方法,使用时重写覆盖即可 */ onUpdate(): void { if (!this.target || !this.camera) return; this.target.transform.position.vsub(this.curpos, this.delatpos); this.camera.transform.position.vadd(this.delatpos, this.delatpos); this.camera.transform.position =...
来源: Laya3.0_文档 发布时间: 20251010
...Script Update Time(T_ScriptUpdateTime) 表示 本帧所有组件脚本 onUpdate() 执行的总耗时(ms)。它统计的是 ComponentDriver.callUpdate() 内遍历执行脚本更新的耗时。 典型用途:判断 CPU 是否主要消耗在脚本逻辑(AI、寻路、数值计算、状态机...
来源: Laya3.0_文档 发布时间: 20260128