refactor(游戏逻辑): 拆分游戏暂停和播放状态的检查条件
将多处 `if(!smc.mission.play || smc.mission.pause)` 条件判断拆分为独立的if语句 在VictoryComp中正确设置pause状态 移除MissionComp中多余的pause状态重置
This commit is contained in:
@@ -32,8 +32,8 @@ export class HeroMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
|
||||
}
|
||||
|
||||
update(e: ecs.Entity) {
|
||||
if (!smc.mission.play || smc.mission.pause) return;
|
||||
|
||||
if (!smc.mission.play ) return;
|
||||
if(smc.mission.pause) return
|
||||
const move = e.get(HeroMoveComp);
|
||||
const model = e.get(HeroAttrsComp);
|
||||
const view = e.get(HeroViewComp);
|
||||
|
||||
Reference in New Issue
Block a user