refactor(game): 앱 및 게임 세션 개선
- App 초기화 로직 정리 - GamePlayScreen 개선 - GameSessionController 확장
This commit is contained in:
@@ -116,7 +116,7 @@ class _AskiiNeverDieAppState extends State<AskiiNeverDieApp> {
|
||||
|
||||
if (exists) {
|
||||
// 세이브 파일에서 미리보기 정보 추출
|
||||
final (outcome, state) = await _controller.saveManager.loadState();
|
||||
final (outcome, state, _) = await _controller.saveManager.loadState();
|
||||
if (outcome.success && state != null) {
|
||||
final actName = _getActName(state.progress.plotStageCount);
|
||||
preview = SavedGamePreview(
|
||||
@@ -477,7 +477,10 @@ class _AskiiNeverDieAppState extends State<AskiiNeverDieApp> {
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
).then((_) {
|
||||
// 새 게임 후 돌아오면 세이브 정보 갱신
|
||||
_checkForExistingSave();
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _loadSave(BuildContext context) async {
|
||||
@@ -502,11 +505,8 @@ class _AskiiNeverDieAppState extends State<AskiiNeverDieApp> {
|
||||
|
||||
if (selectedFileName == null || !context.mounted) return;
|
||||
|
||||
// 선택된 파일 로드
|
||||
await _controller.loadAndStart(
|
||||
fileName: selectedFileName,
|
||||
cheatsEnabled: false,
|
||||
);
|
||||
// 선택된 파일 로드 (치트 모드는 저장된 상태에서 복원)
|
||||
await _controller.loadAndStart(fileName: selectedFileName);
|
||||
|
||||
if (_controller.status == GameSessionStatus.running) {
|
||||
if (context.mounted) {
|
||||
@@ -553,7 +553,10 @@ class _AskiiNeverDieAppState extends State<AskiiNeverDieApp> {
|
||||
onThemeModeChange: _changeThemeMode,
|
||||
),
|
||||
),
|
||||
);
|
||||
).then((_) {
|
||||
// 게임에서 돌아오면 세이브 정보 갱신
|
||||
_checkForExistingSave();
|
||||
});
|
||||
}
|
||||
|
||||
/// Phase 10: 명예의 전당 화면으로 이동
|
||||
|
||||
Reference in New Issue
Block a user