refactor(game): 앱 및 게임 세션 개선
- App 초기화 로직 정리 - GamePlayScreen 개선 - GameSessionController 확장
This commit is contained in:
@@ -528,8 +528,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
|
||||
/// 모바일 재진입 시 전체 화면 재로드
|
||||
Future<void> _reloadGameScreen() async {
|
||||
// 세이브 파일에서 다시 로드
|
||||
await widget.controller.loadAndStart(cheatsEnabled: widget.controller.cheatsEnabled);
|
||||
// 세이브 파일에서 다시 로드 (치트 모드는 저장된 상태에서 복원)
|
||||
await widget.controller.loadAndStart();
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
@@ -550,7 +550,10 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
final currentState = widget.controller.state;
|
||||
if (currentState == null || !widget.controller.isRunning) return;
|
||||
|
||||
await widget.controller.saveManager.saveState(currentState);
|
||||
await widget.controller.saveManager.saveState(
|
||||
currentState,
|
||||
cheatsEnabled: widget.controller.cheatsEnabled,
|
||||
);
|
||||
}
|
||||
|
||||
/// 뒤로가기 시 저장 확인 다이얼로그
|
||||
|
||||
Reference in New Issue
Block a user