refactor(游戏逻辑): 统一使用is_master判断玩家角色并简化暂停逻辑
将多处使用FacSet.HERO判断玩家角色的代码改为使用is_master属性 将stop_mon_action控制逻辑简化为统一的pause状态管理 在MissionComp初始化时确保pause状态正确重置
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user