public void OnLoadButtonClick()
 {
     if (FileStorageSystem.LoadPlainText <string>(FILE_PATH, out LoadResult <string> loadResult))
     {
         input.text = loadResult.data;
     }
 }
        public override void LoadFromFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            if (FileStorageSystem.LoadBinary(filePath, out bool outValue))
            {
                UpdateValue(outValue, false);
            }
        }
        private void LoadGroupVolumeFromFile(VolumeGroup volumeGroup)
        {
            string path = Path.Combine("Audio", "Profiles", $"{name}-{volumeGroup}.txt");

            if (FileStorageSystem.LoadPlainText <float>(path, out LoadResult <string> loadResult))
            {
                SetGroupVolume(volumeGroup, float.Parse(loadResult.data));
            }
        }
        public override void LoadFromFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            if (FileStorageSystem.LoadBinary(filePath, out float outValue))
            {
                currentValue = outValue;
            }
        }
        public override void LoadFromFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            if (FileStorageSystem.LoadBinary(filePath, out bool outValue))
            {
                isDoneOnce = outValue;
            }
        }
        public void OnSaveButtonClick()
        {
            string text = input.text;

            if (!string.IsNullOrEmpty(text))
            {
                FileStorageSystem.SaveAsPlainText(FILE_PATH, text, SaveMode.Hashed);
            }
        }
        /// <summary>Loads value from local storage</summary>
        public void LoadFromFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            if (FileStorageSystem.LoadBinary(filePath, out bool finishedValue))
            {
                SetFinished(finishedValue, false);
            }
        }
Beispiel #8
0
        /// <summary>Loads the active state of this quest from local storage and assigns its value</summary>
        public void LoadActiveStateFromFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            if (FileStorageSystem.LoadBinary(filePath, out bool outValue))
            {
                SetActiveInternal(outValue, false);
            }
        }
        public void SaveGroupVolumeToFile(VolumeGroup volumeGroup)
        {
            string path = Path.Combine("Audio", "Profiles", $"{name}-{volumeGroup}.txt");

            switch (volumeGroup)
            {
            case VolumeGroup.Master:
                FileStorageSystem.SaveAsPlainText(path, masterVolume);
                break;

            case VolumeGroup.Music:
                FileStorageSystem.SaveAsPlainText(path, musicVolume);
                break;

            case VolumeGroup.SFX:
                FileStorageSystem.SaveAsPlainText(path, sfxVolume);
                break;
            }
        }
        protected override void SaveToFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            FileStorageSystem.SaveAsBinary(filePath, currentValue);
        }
Beispiel #11
0
        public override void SaveToFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            FileStorageSystem.SaveAsBinary(filePath, count);
        }
        /// <summary>Saves value to local storage</summary>
        private void SaveToFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            FileStorageSystem.SaveAsBinary(filePath, finished);
        }
Beispiel #13
0
        /// <summary>Saves the active state of this quest to local storage</summary>
        public void SaveActiveStateToFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            FileStorageSystem.SaveAsBinary(filePath, isActive);
        }