From 86cc55b226f71431b9906f9b9aa4bf4e416fde56 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 31 Mar 2026 15:10:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E6=80=AA=E7=89=A9?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E4=BD=8D=E7=BD=AE=E9=99=90=E5=88=B6=E5=B9=B6?= =?UTF-8?q?=E6=89=A9=E5=A4=A7=E7=A7=BB=E5=8A=A8=E8=BE=B9=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除怪物移动目标位置的水平坐标限制,使其可以移动到任意X坐标。 同时将英雄和怪物的移动边界值扩大到极大值,以消除移动范围限制。 --- assets/script/game/hero/Mon.ts | 2 +- assets/script/game/hero/MoveComp.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/script/game/hero/Mon.ts b/assets/script/game/hero/Mon.ts index a6e6f6a0..fa9f5d6d 100644 --- a/assets/script/game/hero/Mon.ts +++ b/assets/script/game/hero/Mon.ts @@ -189,7 +189,7 @@ export class Monster extends ecs.Entity { const move = this.get(MoveComp); move.reset(); move.direction = -1; - move.targetX = Math.max(-320, Math.min(320, pos.x)); + move.targetX = pos.x; move.baseY = dropToY; move.moving = false; diff --git a/assets/script/game/hero/MoveComp.ts b/assets/script/game/hero/MoveComp.ts index 35773a51..6d8e7ffa 100644 --- a/assets/script/game/hero/MoveComp.ts +++ b/assets/script/game/hero/MoveComp.ts @@ -67,16 +67,16 @@ export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate */ private readonly facConfigs: Record = { [FacSet.HERO]: { - moveFrontX: 320, - moveBackX: -320, - retreatFrontX: 300, - retreatBackX: -300, + moveFrontX: 999999, + moveBackX: -999999, + retreatFrontX: 999999, + retreatBackX: -999999, }, [FacSet.MON]: { - moveFrontX: -320, - moveBackX: 320, - retreatFrontX: -300, - retreatBackX: 300, + moveFrontX: -999999, + moveBackX: 999999, + retreatFrontX: -999999, + retreatBackX: 999999, } };