This commit is contained in:
2024-09-30 10:50:57 +08:00
parent 5d79ad7d4f
commit d43b6895c7
11 changed files with 613 additions and 852 deletions

View File

@@ -35,7 +35,7 @@ export class SkillCom extends CCComp {
box_tag:number=0;
type:number = 1;
time:Timer = new Timer(0.01);
run_type:number = 0; // 0直线1贝塞尔曲线 2 不动
run_type:number = 0; // 0有目标 带方向1贝塞尔曲线 2 不动 ,3 直线
in_time:number = 0.3; // 不动技能持续时间
start() {
// console.log("skill start run_type",this.run_type)
@@ -55,7 +55,7 @@ export class SkillCom extends CCComp {
collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
}
if(this.run_type == 3){ //直线,默认直线,有特定目标 朝向目标直线
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)