/// <summary>
        /// Loads the saved data
        /// </summary>
        public virtual void Load()
        {
            InitializeSaveLoadMethod();
            MMSaveLoadTestObject testObject = (MMSaveLoadTestObject)MMSaveLoadManager.Load(typeof(MMSaveLoadTestObject), FileName + SaveFileExtension, FolderName);

            TargetInputField.text = testObject.SavedText;
        }
        /// <summary>
        /// Saves the achievements current status to a file on disk
        /// </summary>
        public static void SaveAchievements()
        {
            DeterminePath();
            SerializedMMAchievementManager serializedMMAchievementManager = new SerializedMMAchievementManager();

            FillSerializedMMAchievementManager(serializedMMAchievementManager);
            MMSaveLoadManager.Save(serializedMMAchievementManager, _saveFileName + _saveFileExtension, _saveFolderName);
        }
        /// <summary>
        /// Saves the contents of the TestObject into a file
        /// </summary>
        public virtual void Save()
        {
            InitializeSaveLoadMethod();
            MMSaveLoadTestObject testObject = new MMSaveLoadTestObject();

            testObject.SavedText = TargetInputField.text;
            MMSaveLoadManager.Save(testObject, FileName + SaveFileExtension, FolderName);
        }
Example #4
0
/// <summary>
/// Loads the settings from file (if found)
/// </summary>
        protected virtual void LoadGameSettings()
        {
            SaveSettings settings = (SaveSettings)MMSaveLoadManager.Load(typeof(GameObject), _saveFileName, _saveFolderName);

            if (settings != null)
            {
                SaveSettings = settings;
            }
        }
 /// <summary>
 /// Loads the sound settings from file (if found)
 /// </summary>
 public virtual void LoadSoundSettings()
 {
     if (Settings.OverrideMixerSettings)
     {
         MMSoundManagerSettings settings =
             (MMSoundManagerSettings)MMSaveLoadManager.Load(typeof(MMSoundManagerSettings), _saveFileName,
                                                            _saveFolderName);
         if (settings != null)
         {
             this.Settings = settings;
             ApplyTrackVolumes();
         }
     }
 }
        // SAVE ------------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Removes saved data and resets all achievements from a list
        /// </summary>
        /// <param name="listID">The ID of the achievement list to reset.</param>
        public static void ResetAchievements(string listID)
        {
            if (_achievements != null)
            {
                foreach (MMAchievement achievement in _achievements)
                {
                    achievement.ProgressCurrent = 0;
                    achievement.UnlockedStatus  = false;
                }
            }

            DeterminePath(listID);
            MMSaveLoadManager.DeleteSave(_saveFileName + _saveFileExtension, _saveFolderName);
            Debug.LogFormat("Achievements Reset");
        }
        /// <summary>
        /// Loads the saved achievements file and updates the array with its content.
        /// </summary>
        public static void LoadSavedAchievements()
        {
            DeterminePath();
            SerializedMMAchievementManager serializedMMAchievementManager = (SerializedMMAchievementManager)MMSaveLoadManager.Load(typeof(SerializedMMAchievementManager), _saveFileName + _saveFileExtension, _saveFolderName);

            ExtractSerializedMMAchievementManager(serializedMMAchievementManager);
        }
 /// <summary>
 /// Resets the sound settings by destroying the save file
 /// </summary>
 public virtual void ResetSoundSettings()
 {
     MMSaveLoadManager.DeleteSave(_saveFileName, _saveFolderName);
 }
 /// <summary>
 /// Saves the sound settings to file
 /// </summary>
 public virtual void SaveSoundSettings()
 {
     MMSaveLoadManager.Save(this.Settings, _saveFileName, _saveFolderName);
 }
 /// <summary>
 /// Resets all saves by deleting the whole folder
 /// </summary>
 protected virtual void Reset()
 {
     MMSaveLoadManager.DeleteSaveFolder(FolderName);
 }
 /// <summary>
 /// Loads the saved data
 /// </summary>
 protected virtual void Load()
 {
     InitializeSaveLoadMethod();
     TestObject = (MMSaveLoadTestObject)MMSaveLoadManager.Load(typeof(MMSaveLoadTestObject), FileName + SaveFileExtension, FolderName);
 }
 /// <summary>
 /// Saves the contents of the TestObject into a file
 /// </summary>
 protected virtual void Save()
 {
     InitializeSaveLoadMethod();
     MMSaveLoadManager.Save(TestObject, FileName + SaveFileExtension, FolderName);
 }
Example #13
0
/// <summary>
/// Resets the settings by destroying the save file
/// </summary>
        protected virtual void ResetGameSettings()
        {
            MMSaveLoadManager.DeleteSave(_saveFileName, _saveFolderName);
        }
Example #14
0
/// <summary>
/// Saves the settings to file
/// </summary>
        protected virtual void SaveGameSettings()
        {
            MMSaveLoadManager.Save(SaveSettings, _saveFileName, _saveFolderName);
        }