Ejemplo n.º 1
0
 public void Load()
 {
     if (File.Exists(Application.persistentDataPath + "/buttonInfo.dat"))
     {
         BinaryFormatter  bf   = new BinaryFormatter();
         FileStream       file = File.Open(Application.persistentDataPath + "/buttonInfo.dat", FileMode.Open);
         BallButtonsState data = (BallButtonsState)bf.Deserialize(file);
         file.Close();
         bools = data.bools;
     }
 }
Ejemplo n.º 2
0
    public void Save()
    {
        BinaryFormatter bf   = new BinaryFormatter();
        FileStream      file = File.Create(Application.persistentDataPath + "/buttonInfo.dat");

        BallButtonsState data = new BallButtonsState();

        data.bools = bools;
        bf.Serialize(file, data);
        file.Close();
    }