大约有 32 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0047 秒)
...(){ this.sprite = this.owner as Laya.Sprite3D; this.animator = this.sprite.getComponent(Laya.Animator) as Laya.Animator; console.log("11"); } public RoleMove(dir:Laya.Vector3) { let norDir:Laya.Vector3 = Laya.Vector3.ZERO; Laya.Vector3.normalize(dir,norDir); console.log(norDir); //this.sprite.tran...
来源: Laya_社区 发布时间: 20191026
...么处理呢? 1、Script2做成static instance? 2、findeNode(Node2).getComponent(Script2).doSomeThing()? 类似这样吗,Script中有findNode类似的api吗? 2020-03-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...
来源: Laya_社区 发布时间: 20200311
... /**获取动画 */ public getAni(): void { this.ani = this.owner.sprite3d.getComponent(Laya.Animator); let all = 486; let arr = ["3,21,run,true", "29,59,wolk,true", "70,120,cheer,true", "125,380,dance,true", "393,440,forerake,false", "443,485,backward,true"]; let state: Laya.AnimatorState; console....
来源: Laya_社区 发布时间: 20190802
...的breakForce ```typescript onStart() { this.fixedConstraint = this.owner.getComponent(FixedConstraint); //设置打破约束的力的阈值 this.fixedConstraint.breakForce = 1000; } onUpdate() { if(this.fixedConstraint) { var mass = this.fixedConstraint.connectedBody.mass; this.fixedConstraint.conn...
来源: Laya2.0_文档 发布时间: 20210715
...的breakForce ```typescript onStart() { this.fixedConstraint = this.owner.getComponent(FixedConstraint); //设置打破约束的力的阈值 this.fixedConstraint.breakForce = 1000; } onUpdate() { if(this.fixedConstraint) { var mass = this.fixedConstraint.connectedBody.mass; this.fixedConstraint.conn...
来源: Laya2.0_文档 发布时间: 20210715
...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
...ipt override public function onStart() { this.fixedConstraint = this.owner.getComponent(FixedConstraint); //设置打破约束的力的阈值 this.fixedConstraint.breakForce = 1000; } override public function onUpdate() { if(this.fixedConstraint) { var mass = this.fixedConstraint.connectedBody.mass;...
来源: Laya2.0_文档 发布时间: 20210714
...any, self: any, contact: any): void { let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody) as Laya.RigidBody; let velocity = rig.linearVelocity; console.log(velocity) } 你把初始弹射改成一个球,你就会发现,这个球,他的水平速度x 小于一定值后就变成0了...
来源: Laya_社区 发布时间: 20200307
...略若干代码 */ //获取物理刚体组件 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_文档 发布时间: 20241014
...,如图3-4所示。 (图3-4) LayaAir 3D引擎的Sprite3D类提供了 getComponent() 方法来获取模型上的组件。带动画的模型在加载创建时引擎默认赋予了Animator(动画状态机)动画组件,因此我们可以这样获取: //获得状态机 this.animator = this....
来源: Laya3.0_文档 发布时间: 20241014