Esempio n. 1
0
 internal static void LoadData()
 {
     QuickLogger.Info("Loading Save Data...");
     ModUtils.LoadSaveData <FEHolderSaveData>(SaveDataFilename, GetSaveFileDirectory(), (data) =>
     {
         _fEHolderSaveData = data;
         QuickLogger.Info("Save Data Loaded");
         OnDataLoaded?.Invoke(_fEHolderSaveData);
     });
 }
Esempio n. 2
0
        internal static void Save()
        {
            if (!IsSaving())
            {
                _saveObject = new GameObject().AddComponent <ModSaver>();

                FEHolderSaveData newSaveData = new FEHolderSaveData();

                var drills = GameObject.FindObjectsOfType <FEHolderController>();

                foreach (var drill in drills)
                {
                    drill.Save(newSaveData);
                }

                _fEHolderSaveData = newSaveData;

                ModUtils.Save <FEHolderSaveData>(_fEHolderSaveData, SaveDataFilename, GetSaveFileDirectory(), OnSaveComplete);
            }
        }