From cd0ba5415e5bda4ab6a85d92cb9c0411b70ee72c Mon Sep 17 00:00:00 2001 From: panw Date: Fri, 3 Apr 2026 16:41:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(hero):=20=E5=9C=A8=E6=88=98=E6=96=97?= =?UTF-8?q?=E9=98=B6=E6=AE=B5=E5=81=9C=E6=AD=A2=E8=8B=B1=E9=9B=84=E5=92=8C?= =?UTF-8?q?=E6=80=AA=E7=89=A9=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免战斗阶段英雄和怪物位置异常变化,确保战斗逻辑与移动逻辑分离。 --- assets/script/game/hero/MoveComp.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/script/game/hero/MoveComp.ts b/assets/script/game/hero/MoveComp.ts index 869a30ad..4a87d98e 100644 --- a/assets/script/game/hero/MoveComp.ts +++ b/assets/script/game/hero/MoveComp.ts @@ -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);