下一步:怪物路线设置

This commit is contained in:
2024-09-18 14:18:23 +08:00
parent 839ccba3de
commit 2ab7279b04
5 changed files with 20 additions and 34 deletions

View File

@@ -185,12 +185,12 @@ export class HeroViewComp extends CCComp {
if(this.stop_cd > 0){
return
}
if (this.scale === 1 && this.node.position.x >= BoxSet.MONSTER_START-150) {
if (this.node.position.x >= 250-this.atk_dis) {
return;
}
if(this.enemy){
return
}
// if(this.enemy){
// return
// }
this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y+dt*this.dir_y, this.node.position.z);
}
hp_show(){
@@ -407,7 +407,7 @@ export class HeroViewComp extends CCComp {
if(this.hp <= 0){
this.dead();
this.is_dead = true;
smc.role_heros[this.role_heros_index].eid == 0
// smc.role_heros[this.role_heros_index].eid == 0
setTimeout(() => {
this.ent.destroy();
}, 15);