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

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

1. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...,如果你需要更新某个item,自行调用renderListItem(索引,getChildAt(索引))就可以了。 如果要侦听点击某一个item的事件,不必每个item加上Click事件的侦听器,而是直接侦听列表的ClickItem事件: list.on(Laya.UIEvent.ClickItem, this, this.onClickIt...

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

2. 节点管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 95%]

...的某个子节点 根据子节点的索引位置,获取子节点对象getChildAt(index:number) 当我们知道某个节点的索引位置时,可以用个此方法找到父节点下一级的某个子节点 根据子节点对象,获取子节点的索引位置getChildIndex(node:Node) 当我们...

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

3. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 82%]

...5, 0.5, 0.5); var aniSprite3d: Sprite3D = (<Sprite3D>this.layaMonkey.getChildAt(0)); //获取动画组件 var animator: Animator = (<Animator>aniSprite3d.getComponent(Animator)); //创建动作状态 var state: AnimatorState = new AnimatorState(); //动作名称 state.name = "run"; //动...

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

4. 网格像素线 · LayaAir3.3 · 引擎文档 · LAYABOX [ 74%]

...umChildren; i < n; i++) Tool.linearModel((<Laya.Sprite3D>sprite3D.getChildAt(i)), lineSprite3D, color); } constructor() { } } 3.4 代码使用 通过如下代码对工具类 Tool.linearModel 的使用,可以把一个 PixelLineSprite3D 对象的网格数据设置成像素线数据: onAwa...

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

5. 2D寻路 · LayaAir3.3 · 引擎文档 · LAYABOX [ 52%]

...p); } for (var i = 0; i < sprite.numChildren; i++) { let child = sprite.getChildAt(i) as Sprite; this.findCompents(lists, child, componentType); } } //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { let sprite = this.owner as L...

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

6. UI运行时 · LayaAir3.3 · 引擎文档 · LAYABOX [ 51%]

... 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); } } } //处理按钮缩放事件 onButtonScaleEvent(target: ...

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

7. 3D粒子 · LayaAir3.3 · 引擎文档 · LAYABOX [ 38%]

...._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); } } this.addChild(this._particle); this._isInited = true; } //粒...

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

8. 3D粒子编辑模块 · LayaAir3文档 · LAYABOX [ 38%]

...._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); } } this.addChild(this._particle); this._isInited = true; } //粒...

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