Esempio n. 1
0
        public static void SaveGame()
        {
            var summary       = new UserData.SaveGameSummary(_gameData, _currentLevel.LevelName);
            var saveGameState = new UserData.SaveGame(summary);

            saveGameState.CurrentTime = _currentTime;
            saveGameState.Player      = _player;

            saveGameState.CurrentLevelId = _currentLevel.LevelId;
            foreach (KeyValuePair <Levels.LevelId, Levels.Level> level in _levels)
            {
                saveGameState.Levels[level.Key] = level.Value.GetSaveDetails();
            }

            saveGameState.Furnishings = Entities.Furnishings.Furnishing.GetSaveData();
            saveGameState.Monsters    = Entities.Monsters.Monster.GetSaveData();

            Quests.GameEventManager.SaveData(saveGameState);

            saveGameState.TopLevelRNG = _topLevelRNG.GetSaveData();
            saveGameState.CombatRNG   = _combatRNG.GetSaveData();
            saveGameState.LootRNG     = _lootRNG.GetSaveData();
            saveGameState.MiscRNG     = _miscRNG.GetSaveData();

            UserDataManager.SaveGame(saveGameState);
        }
Esempio n. 2
0
 public SaveGame(SaveGameSummary summary)
 {
     Summary = summary;
     Levels  = new Dictionary <LevelId, LevelSaveSummary>();
 }