大约有 293 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0132 秒)
...*****593 赞同来自: 你脚本中的init函数要在脚本生命周期的onAwake(此时场景中的节点和组件创建完毕)方法后执行,你在构造函数中调用init,现在场景中的节点还未激活,可以看一下这篇关于节点和脚本的生命周期文档https://ldc2....
来源: Laya_社区 发布时间: 20201230
...operty } = Laya; @regClass() export class StartScene extends Laya.Script { onAwake(): void { Laya.timer.once(1000, this, () => { Laya.loader.loadPackage("common", "http://127.0.0.1:2840", (p) => { console.log("common", p); }) }); } } 2024-11-04 0 0 分享 微博 QZONE 微信 为什么被折叠...
来源: Laya_社区 发布时间: 20241101
...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.ani.source = "resources/role.atlas"; //接收动画数据源为图集 this.ani.autoPlay = true; //开启自动播放 this.ani.wrapMode = 0; //播放模式为正序播放模式(POSITIVE) this.ani.inter...
来源: Laya3.0_文档 发布时间: 20251010
...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { //在节点上添加2D拖尾渲染器 this._trail2D = this.owner.addComponent(Laya.Trail2DRender); //设置淡出时间 this._trail2D.time = 1; //设置最小距离 this._trail2D.minVertexDistance = 0.1; //设...
来源: Laya3.0_文档 发布时间: 20251010
...时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.txtin.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.txtin.size(500, 60); //大小 this.txtin.pivot(this.txtin.width/2, this.txtin.height/2); //轴心点 this.txtin.font = "...
来源: Laya3.0_文档 发布时间: 20251010
...{ console.log("播放完成2"); } onAwake(){ this.setup(); } } 附件 : --> Desktop.rar 2020-09-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交...
来源: Laya_社区 发布时间: 20200925
...lag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName removeChildren removeSelf replaceChild runCallLater setChildIndex timerLoop timerOnce Constructors constructor new Node(): Node Defined in ...
来源: Laya3.0_api 发布时间: 20231115
...ollisionFlags getPhysicsOrientation getPhysicsPosition hasHideFlag onAdded onAwake onDestroy onDisable onEnable onLateUpdate onPostRender onPreRender onReset onStart onUpdate setCollisionFlags wakeUp Constructors constructor new Rigidbody3D(collisionGroup?: number, canCollideWith?: number): Rigidbod...
来源: Laya3.0_api 发布时间: 20231115
...videoPlane: Laya.Sprite3D; private videoTexture = new Laya.VideoTexture(); onAwake(): void { //获取场景中要添加视频纹理的3D节点 this.videoPlane = this.scene.getChildByName("Plane") as Laya.Sprite3D; //使用指定路径的视频文件 this.createVideo("resources/mov_bbb.mp4"); } //创...
来源: Laya3.0_文档 发布时间: 20251010
...此时所有节点和组件均已创建完毕,此方法只执行一次 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