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

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

41. Node的_childs这个属性为什么没有写到文档里?如果不推荐用这个,那应该用怎么拿所有子成员? [ 58%]

...的链接 提交 1 个回复 Laya_XS 赞同来自: 你可以通过对象的numChildren获取,对象里的子元素个数,然后就可以获取相关的子对象了。 2017-11-11 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 a1005945...

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

42. 无限循环滚动列表 [ 58%]

...rollPane.posX + this._list.viewWidth / 2;         var cnt = this._list.numChildren;         for (var i = 0; i < cnt; i++) {             var obj = this._list.getChildAt(i);             var dist = Math.abs(midX - obj.x - obj.width / 2);             if (dist > obj.width)...

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

43. 父元素,子元素,兄弟元素 [ 58%]

...赞同来自: let parent:Laya.Sprite = child.parent;//父 let len = parent.numChildren; for(var i = 0; i < len; i++){ let value = parent.getChildAt(i); if(value != child) { //兄弟 } else{ //自己 } } 2018-09-01 0 1 分享 微博 QZONE 微信 谢春 赞同来自: 可能你所说的是点击事...

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

44. 怎样去访问控制3D模型中的其中一个部件? [ 58%]

...示例吗? 我提问之前就这样尝试过,是不行的,场景的numChildren=1的 2017-07-14 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 wqf196 相关问题 两个对象new了一个相同的对象,调用第一个的一个方...

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

45. laya.d3.core.reflectionprobe.ReflectionProbe_API3.0 [ 57%]

...ts destroyed displayedInStage hideFlags id importance intensity is3D layer numChildren parent probePosition reflectionTexture scene timer transform url Methods _getIndexInReflectionList _initialize _processActive _setIndexInReflectionList addChild addChildAt addChildren addComponent addComponentInst...

来源: Laya3.0_api 发布时间: 20231102

46. 为什么会出现报错 ani not found:ufo1_down [ 56%]

...Loop() { // 遍历所有飞机,更改飞机状态 for(var i = Laya.stage.numChildren - 1; i > 0; i--) { // 接收舞台子对象 var role = Laya.stage.getChildAt(i); // 判断是否有飞机,并且是否有速度值 if(role && role.speed){ // 根据飞机速度更改飞机的位置 ro...

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

47. 关于removeChildren、 destroy和destroyChildren的疑惑 [ 56%]

...adSprite; }());然后如此使用destroy for (var i = 0; i < Laya.stage.numChildren; i++) { var object = Laya.stage.getChildAt(i); // object.removeSelf(); Laya.stage.removeChildAt(i); object.destroy(true); }该对象继续在屏幕上显示。。。(IDE版本1.7.10.bate) 使用Laya.stage.dest...

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

48. Dialog:屏蔽点击Dialog之外的区域关闭弹框 [ 56%]

...ndow.UIConfig.closeDialogOnSide) 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 •...

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

49. laya.d3.core.light.LightSprite_API3.0 [ 55%]

... hideFlags id intensity is3D layer lightWorldMatrix lightmapBakedType mode numChildren parent scene shadowDepthBias shadowDistance shadowMode shadowNearPlane shadowNormalBias shadowResolution shadowStrength timer transform url Methods _initialize _processActive addChild addChildAt addChildren addCom...

来源: Laya3.0_api 发布时间: 20231115

50. 【Native BUG】Native下对根结点设置filter,无法更新到每个子节点,web是ok的 [ 55%]

...: Laya.Node, set: boolean) {             for (var i = 0; i < node.numChildren; i++) {                 let sprite = node.getChildAt(i) as Laya.Sprite;                 if (sprite) {                     //if (sprite instanceof Laya.Text) {                   ...

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