dd
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user