主体 死亡后结束战局

This commit is contained in:
2025-05-29 09:02:38 +08:00
parent 6a185a2361
commit cb1ac100da
4 changed files with 45 additions and 41 deletions

View File

@@ -262,7 +262,11 @@ export class HeroViewComp extends CCComp {
do_dead(){
console.log("dead",this.hero_uuid)
if(this.hero_uuid == 9999){
console.log("mission_loss")
oops.message.dispatchEvent(GameEvent.MissionLoss,this)
}
}
do_atked(remainingDamage:number){
if (this.shield > 0) {
@@ -279,6 +283,7 @@ export class HeroViewComp extends CCComp {
if(this.hp <= 0) {
if(this == null) return;
this.BUFFCOMP.dead()
this.do_dead()
if(this.ent == null) return;
this.ent.destroy();
}
@@ -289,9 +294,7 @@ export class HeroViewComp extends CCComp {
dead(){
this.BUFFCOMP.dead()
this.to_drop()
if(this.hero_uuid == 9999){
oops.message.dispatchEvent(GameEvent.MissionLoss,this)
}
}
//掉落物品