/// <summary> /// Initializes the MissionManager. This Method should be called before using the Manager. /// </summary> private void InitDefaultState() { data = new MissionManagerData(); data.ForceAppearPool = MissionFactory.Instance.GetForceAppearMissions(); AvailableMissionsChanged.Raise(); }
/// <summary> /// Load state from a given savegame. /// </summary> private void LoadState() { var mainSaveGame = SaveGameSystem.Instance.GetCurrentSaveGame(); data = mainSaveGame.missionManagerData; AvailableMissionsChanged.Raise(); CompletedMissionsChanged.Raise(); InProgressMissionsChanged.Raise(); foreach (var m in data.InProgress) { m.Finished.AddListener(missionFinished); createMissionWorker(m); } }