Пример #1
0
 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);
            }
        }
Пример #3
0
        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));
            }
        }
Пример #4
0
        public override void LoadFromFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            if (FileStorageSystem.LoadBinary(filePath, out float outValue))
            {
                currentValue = outValue;
            }
        }
Пример #5
0
        public override void LoadFromFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            if (FileStorageSystem.LoadBinary(filePath, out bool outValue))
            {
                isDoneOnce = outValue;
            }
        }
Пример #6
0
        public void OnSaveButtonClick()
        {
            string text = input.text;

            if (!string.IsNullOrEmpty(text))
            {
                FileStorageSystem.SaveAsPlainText(FILE_PATH, text, SaveMode.Hashed);
            }
        }
Пример #7
0
        /// <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);
            }
        }
Пример #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);
            }
        }
Пример #9
0
        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);
        }
Пример #11
0
        public override void SaveToFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            FileStorageSystem.SaveAsBinary(filePath, count);
        }
Пример #12
0
        /// <summary>Saves value to local storage</summary>
        private void SaveToFile()
        {
            string filePath = Path.Combine(FolderPath, name);

            FileStorageSystem.SaveAsBinary(filePath, finished);
        }
Пример #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);
        }