大约有 410 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)
...体重叠的UI元素的 mouseEnable 设置为 true ,接收鼠标点击 onAwake() { this.isClick = false; //对舞台stage添加点击事件(这里由于有scene的缘故,点击空白处返回的对象是scene) Laya.stage.on(Laya.Event.CLICK,this,function(e) { if(e.target.name == "scene的名...
来源: Laya_社区 发布时间: 20210122
...此时所有节点和组件均已创建完毕,此方法只执行一次 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
...lag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName removeChildren removeInputChild removeSelf replaceChild runCallLater setChildIndex timerLoop timerOnce instantiate load Constructors constr...
来源: Laya3.0_api 发布时间: 20231102
...理不应该是透明的么,在IDE中创建的遮罩效果是正常的 onAwake(): void { let mask: Laya.Sprite = new Laya.Sprite(); Laya.stage.addChild(mask); mask.graphics.drawCircle(80,50,40,"#ffffff"); let sprite: Laya.Sprite = new Laya.Sprite(); Laya.stage.addChild(sprite); sprite.loadImage("m...
来源: Laya_社区 发布时间: 20211002
... LayaAir大为 赞同来自: preventContextMenu: any = null; onAwake(): void { //禁用/启用鼠标右键 this.disableRightClick(); //this.enableRightClick(); //禁用Ctrl+c,Ctrl+v this.owner.on("keydown", this, (event: Keyboar...
来源: Laya_社区 发布时间: 20251115
... = new Laya.Sprite(); let s = new Laya.Script(); s.onAwake = ()=>{ //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 } s.onLateUpdate = ()=>{ //每帧更新时执...
来源: Laya_社区 发布时间: 20181023
...*****593 赞同来自: 你脚本中的init函数要在脚本生命周期的onAwake(此时场景中的节点和组件创建完毕)方法后执行,你在构造函数中调用init,现在场景中的节点还未激活,可以看一下这篇关于节点和脚本的生命周期文档https://ldc2....
来源: Laya_社区 发布时间: 20201230
... 回调参数,如何传递和接收? Laya 2.7.0beta Scene与脚本的onAwake()与onEnable()调用时机存在问题 子节点的 getChildIndex(node:Node):int 根据子节点对象,获取子节点的索引位置。参数是什么 Graphic.drawTextures,第二个参数 pos:Array — 绘制次数...
来源: Laya_社区 发布时间: 20250603
...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skin).then( ()=>{ this.onColorPickerSkinLoaded(); } ); } private onColorPickerSkinLoaded(e: any = null): void { let colorPicker: Laya.ColorPicker = new Laya.ColorPicker(); colorPicker....
来源: Laya3.0_文档 发布时间: 20251010
...ted Methods MethodDefined By _createJoint():void[override] GearJoint _onAwake():void[override] JointBase _onDisable():void[override] JointBase _onEnable():void[override] JointBaseProperty DetailcollideConnectedpropertypublic var collideConnected:Boolean = false[首次设置有效]两个刚体...
来源: Laya2.0_api 发布时间: 20190513