Esempio n. 1
0
 void emptyDataKlaus()
 {
     if (dataKlaus == null)
     {
         dataKlaus = new KlausData();
         dataKlaus.CreateLevels();
         LoadRanksFromServer();
     }
 }
Esempio n. 2
0
    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;
    }