大约有 410 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0040 秒)
...此时所有节点和组件均已创建完毕,此方法只执行一次 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_文档 发布时间: 20250104
...信 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
...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
...ab 的根节点. export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { let sprite3d: Laya.Sprite3D = this.scene3D.getChildByName("m_Sprite3D"); let ui3d: Laya.UI3D = sprite3d.getComponent(Laya.UI3D); let ui3d_root: Laya.Sprite = ui3d.sprite; console.log("ui3d_root", ui3d_root);...
来源: Laya_社区 发布时间: 20251020
...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
...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 加载Spine动画数据资源(json文件),注意一定要设置为Laya.Loader.SPINE类型,否则不会把json认为是SPINE资源 Laya.loader.load("girl2/mix-and-match-pro.json", Laya.Loader.SPINE)....
来源: Laya3.0_文档 发布时间: 20251128
...ate/Conventional/Test.ls", ]; constructor() { super(); } onAwake(): void { Laya.loader.create(this.resource, Laya.Handler.create(this, this.onPreLoadFinish)); } onPreLoadFinish() { //初始化3D场景 let test = Laya.Loader.getRes("ga...
来源: Laya_社区 发布时间: 20190925