死亡计数出错修复 + 刷怪5个后间隔5秒

This commit is contained in:
2025-07-31 17:22:04 +08:00
parent d56b4293d7
commit 7bb49f86d5
7 changed files with 50 additions and 9 deletions

View File

@@ -39,6 +39,7 @@ export class HeroViewComp extends CCComp {
box_group:number = BoxSet.HERO;
is_dead:boolean = false; //是否摧毁
is_count_dead:boolean = false; //是否计数死亡
is_stop:boolean = false;
is_atking:boolean = false;
@@ -446,7 +447,12 @@ export class HeroViewComp extends CCComp {
//console.log("[HeroViewComp]:角色死亡",this.hero_uuid)
if(this.fac==FacSet.MON){
oops.message.dispatchEvent(GameEvent.MonDead)
if(this.is_count_dead) return
this.is_count_dead=true
this.scheduleOnce(()=>{
oops.message.dispatchEvent(GameEvent.MonDead)
},0.1)
}
if(this.fac==FacSet.HERO){