Exemplo n.º 1
0
    public static void Load()
    {
        if (File.Exists(Application.persistentDataPath + "/" + current_filename))
        {
            BinaryFormatter bf   = new BinaryFormatter();
            FileStream      file = File.Open(Application.persistentDataPath + "/" + current_filename, FileMode.Open);/* */
            Notebook_Data   data = (Notebook_Data)bf.Deserialize(file);

            accountID                  = data.AccountID;
            playerName                 = Decrypt(data.PlayerName);
            currentSelectedState       = Decrypt(data.CurrentSelectedState);
            currentSelectedStateStatus = Decrypt(data.CurrentSelectedStateStatus);
            zombieAmount               = data.ZombieAmount;
            won = data.Won;


            file.Close();
        }
        else
        {
            current_filename = "info.dat";
            accountID        = " ";
            SaveData m = new SaveData();
            m.InitializeMapFirstTime();
            SaveData.Save();
        }
    }
Exemplo n.º 2
0
    public static void Load()
    {
        if (File.Exists(Application.persistentDataPath + "/" + current_filename))
        {
            BinaryFormatter bf   = new BinaryFormatter();
            FileStream      file = File.Open(Application.persistentDataPath + "/" + current_filename, FileMode.Open);/* */
            Notebook_Data   data = (Notebook_Data)bf.Deserialize(file);

            accountID         = data.AccountID;
            playerName        = data.PlayerName;
            dubbedMovies      = data.DubbedMovies;
            isGamePannelOn    = data.IsGamePannelOn;
            usageTime         = data.UsageTime;
            isnewversionClose = data.IsNewVersionClose;
            isFirstTime       = data.IsFirstTime;
            adsDelayTime      = data.AdsDelayTime;

            //accountID = "8";//---------------------------------remove this
            file.Close();
            appVersion = "0.2";
        }
        else
        {
            current_filename = "info.dat";
            accountID        = " ";
            saveload.Save();
        }
    }
    public static void Load()
    {
        if (File.Exists(Application.persistentDataPath + "/" + current_filename))
        {
            BinaryFormatter bf   = new BinaryFormatter();
            FileStream      file = File.Open(Application.persistentDataPath + "/" + current_filename, FileMode.Open);/* */
            Notebook_Data   data = (Notebook_Data)bf.Deserialize(file);

            accountID  = data.AccountID;
            playerName = Decrypt(data.PlayerName);

            allSkills          = data.AllSkills;
            selectedexperience = data.SelectedExperience;
            selectedLocations  = data.SelectedLocations;
            applyCount         = data.ApplyCount;

            totalTime  = data.TotalTime;
            correct    = data.Correct;
            wrong      = data.Wrong;
            revision   = data.Revesion;
            ads        = data.Ads;
            repeatUser = data.RepeatUser;

            file.Close();
        }
        else
        {
            current_filename = "info.dat";
            accountID        = " ";
            saveload.Save();
        }
    }
    public static void Save()
    {
        BinaryFormatter bf   = new BinaryFormatter();
        FileStream      file = File.Create(Application.persistentDataPath + "/" + current_filename);
        Notebook_Data   data = new Notebook_Data();


        data.AccountID  = accountID;
        data.PlayerName = Encrypt(playerName);

        data.AllSkills          = allSkills;
        data.SelectedExperience = selectedexperience;
        data.SelectedLocations  = selectedLocations;
        data.ApplyCount         = applyCount;

        data.TotalTime  = totalTime;
        data.Correct    = correct;
        data.Wrong      = wrong;
        data.Revesion   = revision;
        data.Ads        = ads;
        data.RepeatUser = repeatUser;

        bf.Serialize(file, data);
        file.Close();
    }
    public static void Save()
    {
        BinaryFormatter bf   = new BinaryFormatter();
        FileStream      file = File.Create(Application.persistentDataPath + "/" + current_filename);
        Notebook_Data   data = new Notebook_Data();


        data.Password = password; // Encrypt(password);
        data.AppData  = appdata;  //Encrypt(appdata);

        bf.Serialize(file, data);
        file.Close();
    }
    public static void Save()
    {
        BinaryFormatter bf   = new BinaryFormatter();
        FileStream      file = File.Create(Application.persistentDataPath + "/" + current_filename);
        Notebook_Data   data = new Notebook_Data();


        data.AccountID  = accountID;
        data.PlayerName = Encrypt(playerName);


        bf.Serialize(file, data);
        file.Close();
    }
Exemplo n.º 7
0
    public static void Save()
    {
        BinaryFormatter bf   = new BinaryFormatter();
        FileStream      file = File.Create(Application.persistentDataPath + "/" + current_filename);
        Notebook_Data   data = new Notebook_Data();


        data.AccountID         = accountID;
        data.PlayerName        = playerName;
        data.DubbedMovies      = dubbedMovies;
        data.IsGamePannelOn    = isGamePannelOn;
        data.UsageTime         = usageTime;
        data.IsNewVersionClose = isnewversionClose;
        data.IsFirstTime       = isFirstTime;
        data.AdsDelayTime      = adsDelayTime;

        bf.Serialize(file, data);
        file.Close();
    }
    public static void Load()
    {
        if (File.Exists(Application.persistentDataPath + "/" + current_filename))
        {
            BinaryFormatter bf   = new BinaryFormatter();
            FileStream      file = File.Open(Application.persistentDataPath + "/" + current_filename, FileMode.Open);/* */
            Notebook_Data   data = (Notebook_Data)bf.Deserialize(file);

            password = Decrypt(data.Password);
            appdata  = Decrypt(data.AppData);


            file.Close();
        }
        else
        {
            saveload.Save();
        }
    }
    public static void Load()
    {
        if (File.Exists(Application.persistentDataPath + "/" + current_filename))
        {
            BinaryFormatter bf   = new BinaryFormatter();
            FileStream      file = File.Open(Application.persistentDataPath + "/" + current_filename, FileMode.Open);/* */
            Notebook_Data   data = (Notebook_Data)bf.Deserialize(file);

            accountID  = data.AccountID;
            playerName = Decrypt(data.PlayerName);


            file.Close();
        }
        else
        {
            current_filename = "info.dat";
            accountID        = " ";
            saveload.Save();
        }
    }