public CorporationsSaveData CreateSaveData(ISerializableData serializableData) { CitiesCorporations.Utils.LogHelper.LogFormat("Saving {0}", (object)serializableData); CorporationsSaveData saveData = new CorporationsSaveData(serializableData); saveData.MissionList = MissionManager.MissionList; return(saveData); }
public void OnSaveData() { CorporationsSaveData saveData = CorporationsCore.Instance.CreateSaveData(m_serializableData); LogHelper.LogFormat("Created save data"); saveData.Save(); LogHelper.LogFormat("Saved"); }
void ILoadingExtension.OnLevelLoaded(LoadMode mode) { if (m_loading.loadingComplete) { UnityEngine.Debug.Log("OnLoaded"); CorporationsSaveData data = CorporationsSerializing.SerializingInstance.SaveData; if (data != null) { UnityEngine.Debug.Log("data"); CorporationsCore.Instance.RestoreFromSaveData(data); } } }
public void OnLoadData() { //LogHelper.LogFormat("OnLoadData"); //UnityEngine.Debug.Log("Test"); //ChirpLog.Debug(String.Format("OnLoadData")); //LogHelper.Log("OnLoad"); SaveData = CorporationsSaveData.CreateLoadData(m_serializableData); //LogHelper.Log("PostLoad"); //ChirpLog.Debug(String.Format("Restored mission count {0}", saveData.MissionList.Count)); //ChirpLog.Flush(); //foreach (Mission mission in saveData.MissionList) //{ // ChirpLog.Debug(String.Format("Restored mission {0} {1}", mission.MissionId, mission.CreatedTimestamp)); //} //CorporationsCore.Instance.RestoreFromSaveData(saveData); }
internal void RestoreFromSaveData(CorporationsSaveData saveData) { System.Diagnostics.Debug.Assert(saveData.Loaded); MissionManager.MissionList = saveData.MissionList; }