private static Dictionary<string, int> LoadDataFromFile(StatAdapter adapter) { // Загружаем необходимые данные из файла сохранений Dictionary<string, int> data; if (ES2.Exists(_fileName)) { data = ES2.LoadDictionary<string, int>(_fileName + _separator + adapter.Data_ID); } else { Save(adapter); // if doesn't exist - save new clean copy data = adapter.AllData(); Debug.Log(adapter.Data_ID + " could not be loaded. No such dictionary in file."); } return data; }
public void UpdateExistingData(StatAdapter adapter) { UpdateExistingData(adapter.AllData()); }
public static void Save(StatAdapter adapter) { ES2.Save(adapter.AllData(), _fileName + _separator + adapter.Data_ID); }