From fbc3016ab139d689fc810da668fc308e40356a7f Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Wed, 7 Jan 2026 20:59:08 +0900 Subject: [PATCH] =?UTF-8?q?fix(game):=20=EA=B2=8C=EC=9E=84=20=ED=94=8C?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=20=ED=99=94=EB=A9=B4=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/features/game/game_play_screen.dart | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/src/features/game/game_play_screen.dart b/lib/src/features/game/game_play_screen.dart index f0ebdd2..893c45b 100644 --- a/lib/src/features/game/game_play_screen.dart +++ b/lib/src/features/game/game_play_screen.dart @@ -256,6 +256,9 @@ class _GamePlayScreenState extends State final taskType = state.progress.currentTask.type; final isInBattleTask = taskType == TaskType.kill; + debugPrint( + '[BGM] TaskType: $taskType, isInBattle: $isInBattleTask, currentBgm: ${audio.currentBgm}'); + // 전투 태스크 상태 결정 if (isInBattleTask) { // 전투 태스크: 보스 여부에 따라 BGM 선택 @@ -266,11 +269,15 @@ class _GamePlayScreenState extends State // 전환 시점이거나 현재 BGM이 일치하지 않으면 재생 if (!_wasInBattleTask || audio.currentBgm != expectedBgm) { + debugPrint('[BGM] Playing battle BGM: $expectedBgm'); audio.playBgm(expectedBgm); } - } else if (_wasInBattleTask || audio.currentBgm == 'battle' || audio.currentBgm == 'boss') { - // 전투 태스크 종료 또는 BGM 불일치: 마을 BGM으로 복귀 - audio.playBgm('town'); + } else { + // 비전투 태스크: 항상 마을 BGM 유지 (이미 town이면 스킵) + if (audio.currentBgm != 'town') { + debugPrint('[BGM] Playing town BGM (was: ${audio.currentBgm})'); + audio.playBgm('town'); + } } _wasInBattleTask = isInBattleTask;