This commit is contained in:
2024-09-25 17:23:56 +08:00
parent 3870bdec50
commit 5831697fb8
21 changed files with 155 additions and 93 deletions

View File

@@ -55,7 +55,14 @@ export class SkillCom extends CCComp {
collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
}
if(this.run_type == 3){ //直线,默认直线,有特定目标 朝向目标直线
let tx=this.node.position.x+this.dis
// console.log("skill tx:"+tx+" node :"+this.node.position.x)
let e_pos=v3(tx,this.node.position.y)
tween(this.node).to( 0.2,{ position: e_pos},
{onComplete: (target?: object) => { this.is_destroy=true },}
).start();
}
if(this.run_type == 0){ //直线,默认直线,有特定目标 朝向目标直线
let time = 720 / this.speed;