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

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

1. 请问如何给ui下所有的button加一个点击监听事件? [ 100%]

....stage.on(Laya.Event.CLICK, this, function(res:Laya.Event){ if (res.target instanceof Laya.Button){ // click button } }) 2018-12-01 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 183*****288 相关问题 两个对象new了一个相同的...

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

2. 动画-旧版骨骼动画 [ 89%]

...inAnimation动画组件 function addSkinComponent(spirit3D) { if (spirit3D instanceof Laya.MeshSprite3D) { var meshSprite3D = spirit3D; var skinAni = meshSprite3D.addComponent(Laya.SkinAnimations); skinAni.templet = Laya.AnimationTemplet.load(skinAniUrl[0]); skinAni.player.play(); } for (var i = 0, ...

来源: Laya_示例 发布时间: 20260930

3. 高级应用-渲染纹理 [ 86%]

...ra.renderTarget; }); })); } function setMaterials(spirit3D) { if (spirit3D instanceof Laya.MeshSprite3D) { var meshSprite = spirit3D; for (var i = 0; i < meshSprite.meshRender.sharedMaterials.length; i++) { var mat = meshSprite.meshRender.sharedMaterials[i]; mat.disableLight(); } } for (var i = 0; i...

来源: Laya_示例 发布时间: 20260930

4. UI运行时 · LayaAir3.4 · 引擎文档 · LAYABOX [ 75%]

...= 0; i &lt; ui.numChildren; i++) { let child = ui.getChildAt(i); if (child instanceof Laya.Button) { console.log("发现Button"); this.onButtonScaleEvent(child); } else { //查找子节点 this.searchButton(child); } } } //处理按钮缩放事件 onButtonScaleEvent(target: Laya.Button) { target.on(...

来源: Laya3.0_文档 发布时间: 20251010

5. Laya中Button等组件lose skin的问题 [ 72%]

...oreCache===void 0)&amp;&amp; (ignoreCache=false);         if ((url instanceof Array))return this._loadAssets(url,complete,progress,type,priority,cache,group);         var content=Loader.getRes(url);         if (content !=null){             Laya.timer.frameOnce(1,n...

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

6. 对游戏中各种控件字体样式使用“白鹭style”样式表 [ 66%]

...完成之后的回调函数 if (item.onComplete &amp;&amp; item.onComplete instanceof Laya.Handler) { item.onComplete.runWith(content); } if (!content) success = false; if (loadedCount === itemCount &amp;&amp; complete) { complete.runWith(success); } } function loadProgress(item, value) { if (progre...

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

7. 插件开发说明 · LayaAir3.4 · 引擎文档 · LAYABOX [ 46%]

...k { onCreateNode(scene: IEditorEnv.IGameScene, node: Laya.Node) { if (node instanceof Laya.Sprite) node.anchorX = node.anchorY = 0.5; } } Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:57 img{cursor:pointer}

来源: Laya3.0_文档 发布时间: 20251010