diff options
| author | ilotterytea <iltsu@alright.party> | 2022-12-05 21:01:32 +0600 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2022-12-05 21:01:32 +0600 |
| commit | 45891b62bd60ff95fca75c0a618511286c8a11b9 (patch) | |
| tree | 8445174ea90be89ae280cd8f71995debdb3f6673 /core | |
| parent | 1ddb4903962569aa5e1307da0ce3c247420c9154 (diff) | |
savegame fix number 2
Diffstat (limited to 'core')
| -rw-r--r-- | core/src/com/ilotterytea/maxoning/screens/SplashScreen.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java b/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java index de5e1aa..d9520a8 100644 --- a/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java +++ b/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java @@ -11,6 +11,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.utils.Align; import com.badlogic.gdx.utils.viewport.FillViewport; import com.ilotterytea.maxoning.MaxonGame; +import com.ilotterytea.maxoning.player.MaxonSavegame; import com.ilotterytea.maxoning.utils.AssetLoading; import com.ilotterytea.maxoning.utils.OsUtils; import com.ilotterytea.maxoning.utils.serialization.GameDataSystem; @@ -66,7 +67,8 @@ public class SplashScreen implements Screen { AssetLoading.registerItems(game.assetManager, game.locale); if (OsUtils.isAndroid || OsUtils.isIos) { try { - game.setScreen(new GameScreen(game, GameDataSystem.load("latest.sav"), -1)); + MaxonSavegame sav = GameDataSystem.load("latest.sav"); + game.setScreen(new GameScreen(game, (sav == null) ? new MaxonSavegame() : sav, -1)); } catch (IOException | ClassNotFoundException e) { throw new RuntimeException(e); } |
