修复最远距离 选到墓地英雄

This commit is contained in:
2025-01-09 17:16:22 +08:00
parent 8eecefd002
commit 2a42f5b2c9

View File

@@ -239,6 +239,7 @@ export class MissionComp extends CCComp {
let monsters:any= this.get_mons()
for(let i=0;i<monsters.length;i++){
if(monsters[i].HeroView == undefined) return
if(monsters[i].HeroView.in_grave) continue
let mon:any = monsters[i].HeroView.node.position
smc.enemy_pos[i]= mon
if(monsters[i].HeroView.node.position.x > left_x){
@@ -258,6 +259,8 @@ export class MissionComp extends CCComp {
let heros:any= this.get_heros()
for(let i=0;i<heros.length;i++){
if(heros[i].HeroView == undefined) return
if(heros[i].HeroView.in_grave) continue
let ho:any = heros[i].HeroView.node.position
smc.hero_pos[i]= ho
if(heros[i].HeroView.node.position.x > left_x){