Skip to content

Commit

Permalink
Update SaveLoadGame.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
yaleksander authored and Wano-k committed Jul 24, 2024
1 parent 40416fe commit 24a9e41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Scene/SaveLoadGame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ class SaveLoadGame extends Base {
let currentGame = Game.current;
for (let i = 1; i <= Datas.Systems.saveSlots; i++) {
this.gamesDatas.push(null);
Game.current = new Game(i);
await Game.current.load();
const newGame = new Game(i);
await newGame.load();
Game.current = newGame;
this.initializeGame(Game.current);
}
Game.current = currentGame;
Expand Down

0 comments on commit 24a9e41

Please sign in to comment.