feat(英雄系统): 添加英雄复活机制并调整死亡处理逻辑

初始化英雄时添加复活次数属性
修改英雄死亡事件触发条件为复活次数耗尽
移除HeroViewComp中重复的死亡事件触发
This commit is contained in:
walkpan
2026-01-03 19:58:12 +08:00
parent 4a2768cb13
commit 063b882879
3 changed files with 10 additions and 10 deletions

View File

@@ -416,11 +416,7 @@ export class HeroViewComp extends CCComp {
if(this.model.fac === FacSet.HERO){
// 英雄死亡:延迟触发死亡事件
// 🔥 只有主角死亡才触发游戏结束判定
if (this.model.is_master) {
oops.message.dispatchEvent(GameEvent.HeroDead, {
hero_uuid: this.model.hero_uuid
});
}
if (this.model.is_master) return
}
// 根据阵营触发不同事件
if(this.model.fac === FacSet.MON){