fix(hero): 在战斗阶段停止英雄和怪物移动

避免战斗阶段英雄和怪物位置异常变化,确保战斗逻辑与移动逻辑分离。
This commit is contained in:
panw
2026-04-03 16:41:06 +08:00
parent 08b0ad128d
commit cd0ba5415e

View File

@@ -103,6 +103,10 @@ export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
update(e: ecs.Entity) {
/** 战斗未开始/暂停时不驱动移动 */
if (!smc.mission.play || smc.mission.pause) return;
/** 在战斗阶段,英雄和怪物不移动 */
if (smc.mission.in_fight) return;
const model = e.get(HeroAttrsComp);
const move = e.get(MoveComp);
const view = e.get(HeroViewComp);