fix(game): 부활 서비스 및 게임 화면 UI 수정
This commit is contained in:
@@ -155,16 +155,21 @@ class ResurrectionService {
|
|||||||
];
|
];
|
||||||
|
|
||||||
// 기존 큐 초기화 후 부활 시퀀스만 설정
|
// 기존 큐 초기화 후 부활 시퀀스만 설정
|
||||||
|
// 첫 번째 태스크를 현재 태스크로 설정하여 즉시 표시
|
||||||
|
final firstTask = resurrectionQueue.removeAt(0);
|
||||||
nextState = nextState.copyWith(
|
nextState = nextState.copyWith(
|
||||||
queue: QueueState(
|
queue: QueueState(
|
||||||
entries: resurrectionQueue, // 기존 큐 완전 제거
|
entries: resurrectionQueue, // 나머지 큐
|
||||||
),
|
),
|
||||||
// 현재 태스크를 빈 상태로 설정하여 큐에서 다음 태스크를 가져오도록 함
|
// 첫 번째 태스크를 현재 태스크로 직접 설정
|
||||||
progress: nextState.progress.copyWith(
|
progress: nextState.progress.copyWith(
|
||||||
currentTask: const TaskInfo(caption: '', type: TaskType.neutral),
|
currentTask: TaskInfo(
|
||||||
task: const ProgressBarState(
|
caption: firstTask.caption,
|
||||||
|
type: firstTask.taskType,
|
||||||
|
),
|
||||||
|
task: ProgressBarState(
|
||||||
position: 0,
|
position: 0,
|
||||||
max: 1, // 즉시 완료되어 큐에서 다음 태스크 가져옴
|
max: firstTask.durationMillis,
|
||||||
),
|
),
|
||||||
currentCombat: null, // 전투 상태 명시적 초기화
|
currentCombat: null, // 전투 상태 명시적 초기화
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -532,11 +532,14 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
|||||||
);
|
);
|
||||||
Future.delayed(Duration(milliseconds: duration), () async {
|
Future.delayed(Duration(milliseconds: duration), () async {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
// 먼저 게임 재개 (status를 running으로 변경)
|
||||||
_specialAnimation = null;
|
// 이렇게 해야 setState 시 UI가 '일시정지' 상태로 보이지 않음
|
||||||
});
|
|
||||||
// 부활 후 게임 재개 (새 루프 시작)
|
|
||||||
await widget.controller.resumeAfterResurrection();
|
await widget.controller.resumeAfterResurrection();
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
_specialAnimation = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -578,7 +581,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
|||||||
widget.controller.loop?.cycleSpeed();
|
widget.controller.loop?.cycleSpeed();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
isPaused: !widget.controller.isRunning,
|
// 특수 애니메이션 중에는 일시정지 상태로 표시하지 않음
|
||||||
|
isPaused: !widget.controller.isRunning && _specialAnimation == null,
|
||||||
onPauseToggle: () async {
|
onPauseToggle: () async {
|
||||||
await widget.controller.togglePause();
|
await widget.controller.togglePause();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
@@ -702,7 +706,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
|||||||
widget.controller.loop?.cycleSpeed();
|
widget.controller.loop?.cycleSpeed();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
isPaused: !widget.controller.isRunning,
|
// 특수 애니메이션 중에는 일시정지 상태로 표시하지 않음
|
||||||
|
isPaused: !widget.controller.isRunning && _specialAnimation == null,
|
||||||
onPauseToggle: () async {
|
onPauseToggle: () async {
|
||||||
await widget.controller.togglePause();
|
await widget.controller.togglePause();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class _CinematicViewState extends State<CinematicView>
|
|||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontFamily: 'monospace',
|
fontFamily: 'JetBrainsMono',
|
||||||
height: 1.5,
|
height: 1.5,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
@@ -214,7 +214,7 @@ class _AsciiArtDisplay extends StatelessWidget {
|
|||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.cyan,
|
color: Colors.cyan,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontFamily: 'monospace',
|
fontFamily: 'JetBrainsMono',
|
||||||
height: 1.2,
|
height: 1.2,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ class _LogEntryTile extends StatelessWidget {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
color: Theme.of(context).colorScheme.outline,
|
color: Theme.of(context).colorScheme.outline,
|
||||||
fontFamily: 'monospace',
|
fontFamily: 'JetBrainsMono',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class DeathOverlay extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
' _____\n / \\\n| () () |\n \\ ^ /\n |||||',
|
' _____\n / \\\n| () () |\n \\ ^ /\n |||||',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'monospace',
|
fontFamily: 'JetBrainsMono',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Theme.of(context).colorScheme.error,
|
color: Theme.of(context).colorScheme.error,
|
||||||
height: 1.0,
|
height: 1.0,
|
||||||
@@ -369,7 +369,7 @@ class DeathOverlay extends StatelessWidget {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
color: color,
|
color: color,
|
||||||
fontFamily: 'monospace',
|
fontFamily: 'JetBrainsMono',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class _RacePreviewState extends State<RacePreview> {
|
|||||||
TextSpan(
|
TextSpan(
|
||||||
text: char,
|
text: char,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'monospace',
|
fontFamily: 'JetBrainsMono',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
height: 1.2,
|
height: 1.2,
|
||||||
color: _getCharColor(char),
|
color: _getCharColor(char),
|
||||||
|
|||||||
Reference in New Issue
Block a user