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

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

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. Dialog:屏蔽点击Dialog之外的区域关闭弹框 [ 91%]

...e) return; var dialog = this.getChildAt(this.numChildren - 1); if ((dialog instanceof laya.ui.Dialog)) dialog.close("side"); } cheche062 • 2017-12-21 16:31 就此埋下一个坑。。。 灬懂不丨懂丿 • 2018-10-10 23:53 真的没明白 155*****359 • 2018-04-14 20:34 实例化窗...

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

3. ts继承后,代码压缩的问题 [ 87%]

...function() { var extendStatics = Object.setPrototypeOf || { __proto__: [] }instanceof Array && function(d, b) { d.__proto__ = b } || function(d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p] } ; return function(d, b) { extendStatics(d, b); function __() { this.constructor = d } ...

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

4. laya3d的scene里边怎么能添加2d的显示对象? [ 82%]

...象列表里添加2d显示对象,我看3d的addChild源码 if (!((node instanceof laya.d3.core.Sprite3D ))) throw new Error("Sprite3D:Node type must Sprite3D."); 是不支持的,请问有其他方式么? 麟。 • 2018-09-12 18:44 我的目的是想2d的ui可以有3d的坐标系Tran...

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

5. html固定宽高,设置垂直居中没有效果。只有水平居中才生效。看了下源码,感觉在updatePos函数里的算法不对 [ 71%]

...var i = 0; i < this._childs.length; i++){ var e = this._childs[i]; if(e instanceof HTMLElement && e._text.words){ for(var j = 0; j < e._text.words.length; j++){ var w = e._text.words[j]; w.y = (this.height - tArray[1])/2 + w.y; } }else{ e.y = (this.height - tArray[1])/2 + e.y; } } } } ...

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

6. Laya2自动同步cullingMask方案以及灯光裁剪补丁 [ 69%]

... if(this._scene.lightCullingMask && this._scene.lightCullingMask instanceof Function){this._scene.lightCullingMask(scene,this);} 3、对想要开启灯光裁剪的场景调用 LightCullingMask.enableLightCullingMask(scene3d)即可 //注意 ExtCullingMask并不是针对对象进行,而是...

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

7. Laya中Button等组件lose skin的问题 [ 59%]

...oreCache===void 0)&& (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

8. 正常运行的2.1升级到2.2.0出现循环依赖的错误,这是咋回事丫 ? [ 56%]

...t就没了。  无法去掉的import主要是类似 new B, extends B, instanceof B, 以及静态成员访问B.stM 这种形式 例如上面的改成 b=new B() 就真的是循环了。 对于真正的循环可以通过引入一个接口对象等方式解决。这个就要看具体项目了。  ...

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

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

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

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