private void SaveProgress() { Debug.Log("сохраняем"); levelTrustStatic[(int)Proffesion] = LevelTrust; dialogNumStatic[(int)Proffesion] = dialogNum; JSONSaver.SaveStatic(); }
public void forceSave() { JSONSaver.Save <RuleController>(path + "Rules.json", rules); JSONSaver.Save <TerrainController>(path + "Terrains.json", terrains); JSONSaver.Save <UnitController>(path + "Units.json", units); JSONSaver.Save <SpriteController>(path + "Sprites.json", sprites); JSONSaver.Save <ClipController>(path + "Clips.json", clips); }
/// <summary> /// Loading the text from a JSON file. /// </summary> public static void SaveText() { //First save in Scriptable Object EditorUtility.SetDirty(data); EditorUtility.SetDirty(manager); AssetDatabase.SaveAssets(); Debug.Log("Localization Manager: Trying to save changes"); //Then save in JSON JSONSaver.SaveDictionary(data.languages); }
public void Awake() { if (File.Exists(path + "Rules.json")) { rules = JSONSaver.Load <RuleController>(path + "Rules.json"); } else { JSONSaver.Save <RuleController>(path + "Rules.json", rules); } if (File.Exists(path + "Terrains.json")) { terrains = JSONSaver.Load <TerrainController>(path + "Terrains.json"); } else { JSONSaver.Save <TerrainController>(path + "Terrains.json", terrains); } if (File.Exists(path + "Units.json")) { units = JSONSaver.Load <UnitController>(path + "Units.json"); } else { JSONSaver.Save <UnitController>(path + "Units.json", units); } if (File.Exists(path + "Sprites.json")) { sprites = JSONSaver.Load <SpriteController>(path + "Sprites.json"); } else { JSONSaver.Save <SpriteController>(path + "Sprites.json", sprites); } if (File.Exists(path + "Clips.json")) { clips = JSONSaver.Load <ClipController>(path + "Clips.json"); } else { JSONSaver.Save <ClipController>(path + "Clips.json", clips); } rules.Awake(); terrains.Awake(); units.Awake(); sprites.Awake(); clips.Awake(); }
public static void SaveData() { switch (setting) { case Settings.DataBase: DataBaseSaver.SaveData(); break; case Settings.JSON: JSONSaver.SaveData(); break; } ; }
public static void GetData(ITicTacToe platform, IUIHelper uIHelper = null) { switch (setting) { case Settings.DataBase: DataBaseSaver.GetData(platform, uIHelper); break; case Settings.JSON: JSONSaver.GetData(); break; } ; }
// Загрузка todo листа с файла в пользовательский интерфейс private void Window_Loaded(object sender, RoutedEventArgs e) { FileJSON = new JSONSaver(Path); try { ToDoData = FileJSON.LoadData(); } catch (Exception ex) { MessageBox.Show(ex.Message); Close(); } dataGridToDoList.ItemsSource = ToDoData; ToDoData.ListChanged += ToDoDataListChanged; }