feat(game): 게임 세션 및 사망 오버레이 개선
- GameSessionController 기능 확장 - DeathOverlay 상세 사망 정보 표시 - GamePlayScreen 연동 업데이트
This commit is contained in:
@@ -256,9 +256,6 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
final taskType = state.progress.currentTask.type;
|
||||
final isInBattleTask = taskType == TaskType.kill;
|
||||
|
||||
debugPrint(
|
||||
'[BGM] TaskType: $taskType, isInBattle: $isInBattleTask, currentBgm: ${audio.currentBgm}');
|
||||
|
||||
// 전투 태스크 상태 결정
|
||||
if (isInBattleTask) {
|
||||
// 전투 태스크: 보스 여부에 따라 BGM 선택
|
||||
@@ -269,13 +266,11 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
|
||||
// 전환 시점이거나 현재 BGM이 일치하지 않으면 재생
|
||||
if (!_wasInBattleTask || audio.currentBgm != expectedBgm) {
|
||||
debugPrint('[BGM] Playing battle BGM: $expectedBgm');
|
||||
audio.playBgm(expectedBgm);
|
||||
}
|
||||
} else {
|
||||
// 비전투 태스크: 항상 마을 BGM 유지 (이미 town이면 스킵)
|
||||
if (audio.currentBgm != 'town') {
|
||||
debugPrint('[BGM] Playing town BGM (was: ${audio.currentBgm})');
|
||||
audio.playBgm('town');
|
||||
}
|
||||
}
|
||||
@@ -825,6 +820,12 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
deathInfo: state.deathInfo!,
|
||||
traits: state.traits,
|
||||
onResurrect: _handleResurrect,
|
||||
isAutoResurrectEnabled: widget.controller.autoResurrect,
|
||||
onToggleAutoResurrect: () {
|
||||
widget.controller.setAutoResurrect(
|
||||
!widget.controller.autoResurrect,
|
||||
);
|
||||
},
|
||||
),
|
||||
// 승리 오버레이 (게임 클리어)
|
||||
if (widget.controller.isComplete)
|
||||
@@ -968,6 +969,12 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
deathInfo: state.deathInfo!,
|
||||
traits: state.traits,
|
||||
onResurrect: _handleResurrect,
|
||||
isAutoResurrectEnabled: widget.controller.autoResurrect,
|
||||
onToggleAutoResurrect: () {
|
||||
widget.controller.setAutoResurrect(
|
||||
!widget.controller.autoResurrect,
|
||||
);
|
||||
},
|
||||
),
|
||||
// 승리 오버레이 (게임 클리어)
|
||||
if (widget.controller.isComplete)
|
||||
|
||||
Reference in New Issue
Block a user