fix(game): 부활 서비스 및 게임 화면 UI 수정

This commit is contained in:
JiWoong Sul
2025-12-26 00:57:47 +09:00
parent dd83923ddf
commit 431dd995bf
6 changed files with 27 additions and 17 deletions

View File

@@ -155,16 +155,21 @@ class ResurrectionService {
];
// 기존 큐 초기화 후 부활 시퀀스만 설정
// 첫 번째 태스크를 현재 태스크로 설정하여 즉시 표시
final firstTask = resurrectionQueue.removeAt(0);
nextState = nextState.copyWith(
queue: QueueState(
entries: resurrectionQueue, // 기존 큐 완전 제거
entries: resurrectionQueue, // 나머지 큐
),
// 현재 태스크를 빈 상태로 설정하여 큐에서 다음 태스크를 가져오도록 함
// 첫 번째 태스크를 현재 태스크로 직접 설정
progress: nextState.progress.copyWith(
currentTask: const TaskInfo(caption: '', type: TaskType.neutral),
task: const ProgressBarState(
currentTask: TaskInfo(
caption: firstTask.caption,
type: firstTask.taskType,
),
task: ProgressBarState(
position: 0,
max: 1, // 즉시 완료되어 큐에서 다음 태스크 가져옴
max: firstTask.durationMillis,
),
currentCombat: null, // 전투 상태 명시적 초기화
),

View File

@@ -532,11 +532,14 @@ class _GamePlayScreenState extends State<GamePlayScreen>
);
Future.delayed(Duration(milliseconds: duration), () async {
if (mounted) {
setState(() {
_specialAnimation = null;
});
// 부활 후 게임 재개 (새 루프 시작)
// 먼저 게임 재개 (status를 running으로 변경)
// 이렇게 해야 setState 시 UI가 '일시정지' 상태로 보이지 않음
await widget.controller.resumeAfterResurrection();
if (mounted) {
setState(() {
_specialAnimation = null;
});
}
}
});
}
@@ -578,7 +581,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
widget.controller.loop?.cycleSpeed();
setState(() {});
},
isPaused: !widget.controller.isRunning,
// 특수 애니메이션 중에는 일시정지 상태로 표시하지 않음
isPaused: !widget.controller.isRunning && _specialAnimation == null,
onPauseToggle: () async {
await widget.controller.togglePause();
setState(() {});
@@ -702,7 +706,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
widget.controller.loop?.cycleSpeed();
setState(() {});
},
isPaused: !widget.controller.isRunning,
// 특수 애니메이션 중에는 일시정지 상태로 표시하지 않음
isPaused: !widget.controller.isRunning && _specialAnimation == null,
onPauseToggle: () async {
await widget.controller.togglePause();
setState(() {});

View File

@@ -134,7 +134,7 @@ class _CinematicViewState extends State<CinematicView>
style: const TextStyle(
color: Colors.white,
fontSize: 18,
fontFamily: 'monospace',
fontFamily: 'JetBrainsMono',
height: 1.5,
),
textAlign: TextAlign.center,
@@ -214,7 +214,7 @@ class _AsciiArtDisplay extends StatelessWidget {
style: const TextStyle(
color: Colors.cyan,
fontSize: 14,
fontFamily: 'monospace',
fontFamily: 'JetBrainsMono',
height: 1.2,
),
textAlign: TextAlign.center,

View File

@@ -114,7 +114,7 @@ class _LogEntryTile extends StatelessWidget {
style: TextStyle(
fontSize: 10,
color: Theme.of(context).colorScheme.outline,
fontFamily: 'monospace',
fontFamily: 'JetBrainsMono',
),
),
const SizedBox(width: 4),

View File

@@ -102,7 +102,7 @@ class DeathOverlay extends StatelessWidget {
Text(
' _____\n / \\\n| () () |\n \\ ^ /\n |||||',
style: TextStyle(
fontFamily: 'monospace',
fontFamily: 'JetBrainsMono',
fontSize: 14,
color: Theme.of(context).colorScheme.error,
height: 1.0,
@@ -369,7 +369,7 @@ class DeathOverlay extends StatelessWidget {
style: TextStyle(
fontSize: 11,
color: color,
fontFamily: 'monospace',
fontFamily: 'JetBrainsMono',
),
),
),

View File

@@ -99,7 +99,7 @@ class _RacePreviewState extends State<RacePreview> {
TextSpan(
text: char,
style: TextStyle(
fontFamily: 'monospace',
fontFamily: 'JetBrainsMono',
fontSize: 18,
height: 1.2,
color: _getCharColor(char),