Example #1
0
        public CorporationsSaveData CreateSaveData(ISerializableData serializableData)
        {
            CitiesCorporations.Utils.LogHelper.LogFormat("Saving {0}", (object)serializableData);
            CorporationsSaveData saveData = new CorporationsSaveData(serializableData);

            saveData.MissionList = MissionManager.MissionList;
            return(saveData);
        }
Example #2
0
        public void OnSaveData()
        {
            CorporationsSaveData saveData = CorporationsCore.Instance.CreateSaveData(m_serializableData);

            LogHelper.LogFormat("Created save data");
            saveData.Save();
            LogHelper.LogFormat("Saved");
        }
Example #3
0
 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);
         }
     }
 }
Example #4
0
        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);
        }
Example #5
0
 internal void RestoreFromSaveData(CorporationsSaveData saveData)
 {
     System.Diagnostics.Debug.Assert(saveData.Loaded);
     MissionManager.MissionList = saveData.MissionList;
 }