Exemplo 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;
        }
Exemplo 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;
 }