大约有 384 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0040 秒)
...时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake() { //得到3D对象 this.obj = this.owner; } onStart() { } /** * 覆写组件更新方法(相当于帧循环) */ onUpdate() { //所属脚本对象旋转更新 this.obj.transform.rotate(this.rotation, false, false) ...
来源: Laya_社区 发布时间: 20200611
...ends TestViewUI { constructor() { super(); } onAwake() { this.nativeImg = new Image(); let style = this.nativeImg.style; style.position = 'absolute'; style.visibility = 'hidden'; style.zIndex = 9999; ...
来源: Laya_社区 发布时间: 20230323
...lag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName removeChildren removeSelf replaceChild runCallLater setChildIndex timerLoop timerOnce instantiate load Constructors constructor new Rendera...
来源: Laya3.0_api 发布时间: 20231115
...信 Ace1024 赞同来自: 是要模仿镜头移动功能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate()...
来源: Laya_社区 发布时间: 20190214
...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { //加载Spine动画资源 Laya.loader.load("resources/boy/spineboy-pma.skel").then(() => { //添加spine组件 this.spine = this.sprite.addComponent(Laya.Spine2DRenderNode); this.spine.source = "resources/b...
来源: Laya3.0_文档 发布时间: 20241014
...itInfo:Laya.HitResult=new Laya.HitResult() physics:Laya.PhysicsSimulation; onAwake():void{ this.camera = this.owner.getChildByName("Main Camera") as Laya.Camera; let scene: Laya.Scene3D = this.owner.scene as Laya.Scene3D; this.physics=scene.physicsSimulation; console.log("相机位置",(thi...
来源: Laya_社区 发布时间: 20190621
...lag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName removeChildren removeSelf replaceChild runCallLater setChildIndex timerLoop timerOnce instantiate load Constructors constructor new Directi...
来源: Laya3.0_api 发布时间: 20231115
...ouseEnabled=false,则停止设置父节点mouseEnabled属性)。 Node onAwake():void 组件被激活后执行,此时所有节点和组件均已创建完毕,次方法只执行一次 此方法为虚方法,使用时重写覆盖即可 Node once(type:String, caller:*, listener:Function, arg...
来源: Laya2.0_api 发布时间: 20190513
...可以正常执行,但是 constructor() { super(); //添加3D场景 this.onAwake(); //加载camera和light this.onStart(); //加载地面 this.loadGround(); //加载墙面 this.loadwall(); this.loopShoot(); } public loopShoot(): void{ Laya.timer.loop(1000, this, this.shootBall); } public shootB...
来源: Laya_社区 发布时间: 20190506
...lag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName removeChildren removeInputChild removeSelf replaceChild runCallLater setChildIndex timerLoop timerOnce createFromMesh createFromMeshAndHeig...
来源: Laya3.0_api 发布时间: 20231102