From a6dbda13b1ba30d7156db83e6b30283f78d95117 Mon Sep 17 00:00:00 2001 From: pan Date: Fri, 11 Sep 2026 15:46:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(mission):=20=E4=BF=AE=E5=A4=8D=E5=9B=9E?= =?UTF-8?q?=E5=90=88=E5=BC=80=E5=A7=8B=E5=89=8D=E6=9C=AA=E9=80=89=E8=8B=B1?= =?UTF-8?q?=E9=9B=84=E7=9B=B4=E6=8E=A5=E5=BC=80=E6=88=98=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整关卡战斗阶段切换逻辑,新增MissionPhase.Battle相位守卫,避免未选择英雄就自动进入战斗导致玩家判负;同时调整mission.prefab的UI布局参数适配新逻辑 --- assets/resources/gui/element/mission.prefab | 19 +++++++++---------- assets/script/game/map/MissionComp.ts | 7 +++++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/assets/resources/gui/element/mission.prefab b/assets/resources/gui/element/mission.prefab index 060d3fea..5568977e 100644 --- a/assets/resources/gui/element/mission.prefab +++ b/assets/resources/gui/element/mission.prefab @@ -3131,7 +3131,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 589.929, + "y": 902.919, "z": 0 }, "_lrot": { @@ -3588,7 +3588,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 331.679, + "y": 644.669, "z": 0 }, "_lrot": { @@ -3661,7 +3661,7 @@ "_top": 535, "_bottom": 645, "_horizontalCenter": 0, - "_verticalCenter": -308.321, + "_verticalCenter": 4.668999999999983, "_isAbsLeft": true, "_isAbsRight": true, "_isAbsTop": true, @@ -3766,7 +3766,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 70.17200000000003, + "y": 383.162, "z": 0 }, "_lrot": { @@ -4620,7 +4620,7 @@ "_top": 340.279, "_bottom": -521.315, "_horizontalCenter": 0, - "_verticalCenter": -569.828, + "_verticalCenter": -256.838, "_isAbsLeft": true, "_isAbsRight": true, "_isAbsTop": true, @@ -5384,8 +5384,8 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 230, - "y": 1110, + "x": 0, + "y": 980, "z": 0 }, "_lrot": { @@ -6711,11 +6711,11 @@ "__prefab": { "__id__": 320 }, - "_alignFlags": 33, + "_alignFlags": 17, "_target": null, "_left": 310, "_right": 30, - "_top": 20, + "_top": 150, "_bottom": 638.669, "_horizontalCenter": 0, "_verticalCenter": 0, @@ -6868,7 +6868,6 @@ "time_label": { "__id__": 305 }, - "phase_label": null, "tooltip": { "__id__": 240 }, diff --git a/assets/script/game/map/MissionComp.ts b/assets/script/game/map/MissionComp.ts index 7989540d..8221259c 100644 --- a/assets/script/game/map/MissionComp.ts +++ b/assets/script/game/map/MissionComp.ts @@ -995,8 +995,11 @@ export class MissionComp extends CCComp { this.isBossWave = true; // 单场 Boss 战,恒为 Boss 战(超时阈值/预警走 Boss 档) - if (wave > 1) { - // 在新一回合到来时,先进入 BattleEnd,2秒后自动进入下一回合的准备阶段 + if (wave > 1 && this.currentPhase === MissionPhase.Battle) { + // 战斗中回合更迭:先进入 BattleEnd,2秒后自动进入下一回合的准备阶段。 + // Why: NewWave 现在仅在 SectionStart(Prepare 阶段,等待三选一)时派发, + // 不加相位守卫会把"下一节/再来一次"从 Prepare 强切 BattleEnd, + // 导致玩家还没选英雄就自动开战,场上无英雄直接判负 this.changePhase(MissionPhase.BattleEnd); } else { // 第1回合不需要结束上一回合,延迟一点播放提示,避免被开始游戏的loading遮挡