大约有 293 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0146 秒)
...调用到弹窗的脚本组件的设置数据方法,设置好数据后在onAwake里设置内容,这个方法的问题是存在弹出动画的时候会有差异,onOpended方法是在动画运行完毕之后才触发的;或者先设置弹窗里的元素不可见,在onOpened方法里面设置...
来源: Laya_社区 发布时间: 20231221
...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.radiogroup.pos(100, 100); this.radiogroup.labels = "label0,label1,label2"; this.radiogroup.space = 20; this.radiogroup.selectedIndex = 0; this.radiogroup.direction = "vertical"; } } 二、创建自定义...
来源: Laya3.0_文档 发布时间: 20251016
...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.btn.scale(5, 5); //放大五倍 this.btn.skin = "atlas/comp/button.png"; //皮肤 this.btn.stateNum = 3; //皮肤状态 this.btn.label = "确定"; //文本标签 this.btn.labelFont = "宋体"; //文本标...
来源: Laya3.0_文档 发布时间: 20251010
...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
...*/ constructor() { super(); } onAwake() { console.log("场景渲染完成", this.speed); } } IDE中报错: [15:26:34] Working directory changed to E:\LayaAirIDE\resources\app [15:26:35] Using gulpfile E:\myLaya\demo2\.lay...
来源: Laya_社区 发布时间: 20191227
...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 Sprite3...
来源: Laya3.0_api 发布时间: 20231115
...ouseEnabled=false,则停止设置父节点mouseEnabled属性)。 Node onAwake():void 组件被激活后执行,此时所有节点和组件均已创建完毕,次方法只执行一次 此方法为虚方法,使用时重写覆盖即可 Node once(type:String, caller:*, listener:Function, arg...
来源: Laya2.0_api 发布时间: 20190513
...两次,也可以做到。我修改了您demo中的部分代码: onAwake(): void { Laya.stage.on(Laya.Event.MOUSE_DOWN, () => { Laya.loader.load("resources/916.mp4").then(() => { this.play(); }); }) ...
来源: Laya_社区 发布时间: 20231007
...///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.html.js:1399:37) at TestHtml.onAwake (file:///D:/LayaTest/TestHtml2.2.0/bin/js/bundle.js:27:34) at TestHtml._activeHierarchy (file:///D:/LayaTest/TestHtml2.2.0/bin/libs/laya.core.js:12332:22) 附件 : --> TestHtml2.2_.0_.zip 2019-10-28 添加评论 ...
来源: Laya_社区 发布时间: 20191028
...以的,不知是不是3的bug还是需要用其他方法来实现。 onAwake(): void { // 无加载失败重试 Laya.loader.retryNum = 0; var urls: any = ["do not exist", "resources/res/fighter/fighter.png", "resources/res/legend/map.jpg"]; ...
来源: Laya_社区 发布时间: 20240705