refactor(游戏逻辑): 拆分游戏暂停和播放状态的检查条件
将多处 `if(!smc.mission.play || smc.mission.pause)` 条件判断拆分为独立的if语句 在VictoryComp中正确设置pause状态 移除MissionComp中多余的pause状态重置
This commit is contained in:
@@ -27,7 +27,6 @@ export class SMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
}
|
||||
|
||||
entityEnter(entity: ecs.Entity): void {
|
||||
if(!smc.mission.play || smc.mission.pause) return;
|
||||
const moveComp = entity.get(SMoveDataComp);
|
||||
const skillView = entity.get(SkillView);
|
||||
|
||||
@@ -107,7 +106,8 @@ export class SMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
}
|
||||
|
||||
update(entity: ecs.Entity): void {
|
||||
if(!smc.mission.play || smc.mission.pause) return;
|
||||
if(!smc.mission.play ) return;
|
||||
if(smc.mission.pause) return
|
||||
const moveComp = entity.get(SMoveDataComp);
|
||||
const skillView = entity.get(SkillView);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user