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

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

101. Spine渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 44%]

...): void { //拿到IDE节点上挂载的spine组件 this.spine = this.owner.getComponent(Laya.Spine2DRenderNode); let currentSkin: string = this.spine.skinName; // 记录当前皮肤状态 //播放停止后执行逻辑 this.owner.on(Laya.Event.STOPPED, this, () => { // 通过三元运算符切换...

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

102. rigidBody.applyForce 物体不会移动 [ 44%]

...is.character = littleGirl; //獲取動畫組建 this.animator = littleGirl.getComponent(Laya.Animator) as Laya.Animator; this.playIdle(); this.rigidBody = this.character.getComponent(Laya.Rigidbody3D); Laya.timer.frameLoop(1, this, this.onKeyDown); //獲取照相機 var camera: Laya.Camera = littleG...

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

103. 3D物理系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 43%]

...略若干代码 */ //获取物理刚体组件 this.rigidbody1 = this.cube1.getComponent(Laya.Rigidbody3D) as Laya.Rigidbody3D; this.rigidbody2 = this.cube2.getComponent(Laya.Rigidbody3D) as Laya.Rigidbody3D; //设置rigidbody1为触发器,取消物理反馈 this.rigidbody1.isTrigger = true; this.rig...

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

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

...ny[], sprite: Sprite, componentType: typeof Component) { let comp = sprite.getComponent(componentType); 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); } } //组件...

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

105. 动画状态机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 35%]

...,如图3-4所示。 (图3-4) LayaAir 3D引擎的Sprite3D类提供了 getComponent() 方法来获取模型上的组件。带动画的模型在加载创建时引擎默认赋予了Animator(动画状态机)动画组件,因此我们可以这样获取: //获得状态机 this.animator = this....

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

106. 使用3D摄像机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 30%]

...每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 * 此方法为虚方法,使用时重写覆盖即可 */ onUpdate(): void { if (!this.target || !this.camera) return; this.target.transform.position.vsub(this.curpos, this.delatpos); this.camera.transform.p...

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

107. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 30%]

...修改组件属性,场景里的对象会自动同步,无需手动 node.getComponent("MeshRenderer").props.enabled = false; 2、调用节点/组件的一个方法,并返回值。例如: //下面是UI进程代码 //获取选中的节点 let node = Editor.scene.getSelection()[0]; //调用MyScri...

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