refactor(游戏逻辑): 统一使用is_master判断玩家角色并简化暂停逻辑

将多处使用FacSet.HERO判断玩家角色的代码改为使用is_master属性
将stop_mon_action控制逻辑简化为统一的pause状态管理
在MissionComp初始化时确保pause状态正确重置
This commit is contained in:
walkpan
2026-01-03 19:33:53 +08:00
parent e343e26862
commit 4a2768cb13
4 changed files with 8 additions and 9 deletions

View File

@@ -361,7 +361,7 @@ export class HeroViewComp extends CCComp {
this.lastBarUpdateTime=0
// 恢复怪物行动
if (this.model.fac === FacSet.HERO) {
if (this.model.is_master) {
smc.mission.stop_mon_action = false;
console.log("[HeroViewComp] Hero revived, resuming monster action");
}