• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 410 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)

181. Button和下面的3D物体重叠,点击button,3D物体会同时响应自己的鼠标脚本 [ 56%]

...体重叠的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

182. 单选框组容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 56%]

...此时所有节点和组件均已创建完毕,此方法只执行一次 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

183. laya.d3.core.reflectionprobe.ReflectionProbe_API3.0 [ 56%]

...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

184. 关于代码创建的遮罩会显示遮罩背景色的问题 [ 55%]

...理不应该是透明的么,在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

185. [LayaAirIDE3]如何TextArea屏蔽掉右键的快捷菜单 [ 55%]

... LayaAir大为 赞同来自:     preventContextMenu: any = null;     onAwake(): void {         //禁用/启用鼠标右键         this.disableRightClick();         //this.enableRightClick();         //禁用Ctrl+c,Ctrl+v         this.owner.on("keydown", this, (event: Keyboar...

来源: Laya_社区 发布时间: 20251115

186. [LayaAir 1.0]怎么给动态添加的组件 添加附加脚本 [ 55%]

... = new Laya.Sprite();         let s = new Laya.Script();         s.onAwake = ()=>{           //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次         }         s.onLateUpdate = ()=>{           //每帧更新时执...

来源: Laya_社区 发布时间: 20181023

187. laya2.9版本,脚本如何正确添加,现在报错“on”of null [ 55%]

...*****593 赞同来自: 你脚本中的init函数要在脚本生命周期的onAwake(此时场景中的节点和组件创建完毕)方法后执行,你在构造函数中调用init,现在场景中的节点还未激活,可以看一下这篇关于节点和脚本的生命周期文档https://ldc2....

来源: Laya_社区 发布时间: 20201230

188. [LayaAir3]Laya.Scene.Open的param参数没有传入runtime脚本的onOpen [ 55%]

... 回调参数,如何传递和接收? Laya 2.7.0beta Scene与脚本的onAwake()与onEnable()调用时机存在问题 子节点的 getChildIndex(node:Node):int 根据子节点对象,获取子节点的索引位置。参数是什么 Graphic.drawTextures,第二个参数 pos:Array — 绘制次数...

来源: Laya_社区 发布时间: 20250603

189. 取色器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 55%]

...此时所有节点和组件均已创建完毕,此方法只执行一次 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

190. laya.physics.joint.GearJoint [ 55%]

...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