Esempio n. 1
0
        private static void PopulateWithLoadedData(GameState sourceState, SavedGame loadedGame)
        {
            sourceState.Inventory.Body = loadedGame.Body;
            sourceState.Inventory.Gun = loadedGame.Gun;
            sourceState.Inventory.Shield = loadedGame.Shield;
            sourceState.Inventory.Money = loadedGame.Money;
            sourceState.GameStory.NextLevelIndex = loadedGame.NextLevelIndex;

            return;
        }
Esempio n. 2
0
 private static SavedGame MapToSavedGame(GameState gameState)
 {
     var savedGame = new SavedGame
                         {
                             Body = gameState.Inventory.Body,
                             Gun = gameState.Inventory.Gun,
                             Shield = gameState.Inventory.Shield,
                             Money = gameState.Inventory.Money,
                             NextLevelIndex = gameState.GameStory.NextLevelIndex
                         };
     return savedGame;
 }