void emptyDataKlaus() { if (dataKlaus == null) { dataKlaus = new KlausData(); dataKlaus.CreateLevels(); LoadRanksFromServer(); } }
IEnumerator SaveData(KlausData data, string fileName) { while (isSaving) { yield return(null); } isBusy = true; m_lastModification = DateTime.Now; BinaryFormatter bf = new BinaryFormatter(); FileStream file = File.Create(GetPath(fileName)); bf.Serialize(file, m_lastModification); data.WriteToBuffer(ref bf, ref file); file.Flush(); file.Close(); isBusy = false; }