This commit is contained in:
2025-07-17 23:51:21 +08:00
parent db026e990d
commit 250df54c29

View File

@@ -160,8 +160,9 @@ export class SkillCom extends CCComp {
enemys.forEach(entity => { enemys.forEach(entity => {
let view=entity.get(HeroViewComp) let view=entity.get(HeroViewComp)
if(view){ if(view){
let dis =Math.abs(this.node.position.x-view.node.position.x) let dis_x =Math.abs(this.node.position.x-view.node.position.x)
if(dis > SkillSet[this.s_uuid].with) return let dis_y =Math.abs(this.node.position.y-view.node.position.y)
if(dis_x > SkillSet[this.s_uuid].with||dis_y > SkillSet[this.s_uuid].with) return
this.single_damage(view,true) this.single_damage(view,true)
} }
}); });