攻击距离设定

This commit is contained in:
2024-09-11 10:19:35 +08:00
parent 0f7f2ad49b
commit f5a8cb20de
31 changed files with 114 additions and 191 deletions

View File

@@ -63,9 +63,9 @@ export class BoxRangComp extends CCComp {
this.MonViewComp.enemy = otherCollider.node;
}
}
if(Math.abs(other_pos.x-self_pos.x) < this.atk_range){
if(Math.abs(other_pos.x-self_pos.x) < this.MonViewComp.atk_dis){
this.MonViewComp.is_atking = true;
// this.MonViewComp.stop_cd = 0.1
this.MonViewComp.stop_cd = 0.1
}
}