大约有 7 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0031 秒)
...时,可以用个此方法可获取子节点 获取子节点对象数量numChildren 通过调用父节点的numChildren属性,可以获得父节点下一级的所有子节点的数量,可用来遍历所有子节点使用,注意不包括子节点下的子节点 获取父节点对象parent 通...
来源: Laya3.0_文档 发布时间: 20251010
...回调函数渲染item。 //创建100个对象,注意这里不能使用numChildren,numChildren是只读的。 aList.numItems = 100; 如果新设置的项目数小于当前的项目数,那么多出来的item将放回池里。 使用这种方式生成的列表,如果你需要更新某个item...
来源: Laya3.0_文档 发布时间: 20251128
...nsVertex0, color, color); } } for (var i: number = 0, n: number = sprite3D.numChildren; i < n; i++) Tool.linearModel((<Laya.Sprite3D>sprite3D.getChildAt(i)), lineSprite3D, color); } constructor() { } } 3.4 代码使用 通过如下代码对工具类 Tool.linearModel 的使用,可以把一...
来源: Laya3.0_文档 发布时间: 20251010
...pe); if (comp != null) { lists.push(comp); } for (var i = 0; i < sprite.numChildren; i++) { let child = sprite.getChildAt(i) as Sprite; this.findCompents(lists, child, componentType); } } //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake...
来源: Laya3.0_文档 发布时间: 20251010
...包括子节点下 searchButton(ui: Laya.Node) { for (let i = 0; i < ui.numChildren; i++) { let child = ui.getChildAt(i); if (child instanceof Laya.Button) { console.log("发现Button"); this.onButtonScaleEvent(child); } else { //查找子节点 this.searchButton(child); } } } //处理按钮缩...
来源: Laya3.0_文档 发布时间: 20251010
...子系统,用于后面整体播放 for (var i = 0, len = this._particle.numChildren; i < len; i++) { var child:Node = this._particle.getChildAt(i); if (child instanceof Laya.ShuriKenParticle3D) { this._shuriKenParticle3D.push(child); this._shurikenParticleSystem.push(child.particleSystem); } } ...
来源: Laya3.0_文档 发布时间: 20251010
...子系统,用于后面整体播放 for (var i = 0, len = this._particle.numChildren; i < len; i++) { var child:Node = this._particle.getChildAt(i); if (child instanceof Laya.ShuriKenParticle3D) { this._shuriKenParticle3D.push(child); this._shurikenParticleSystem.push(child.particleSystem); } } ...
来源: Laya3.0_文档 发布时间: 20250104