fix: 移除怪物移动位置限制并扩大移动边界

移除怪物移动目标位置的水平坐标限制,使其可以移动到任意X坐标。
同时将英雄和怪物的移动边界值扩大到极大值,以消除移动范围限制。
This commit is contained in:
panw
2026-03-31 15:10:13 +08:00
parent 3c4e1aad29
commit 86cc55b226
2 changed files with 9 additions and 9 deletions

View File

@@ -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;