示例#1
0
    public void Save()
    {
        BinaryFormatter bf   = new BinaryFormatter();
        FileStream      file = File.Create(Application.persistentDataPath + "/toad.dat");

        bf.Serialize(file, PlayerData);
        file.Close();
        // Debug.Log(string.Format("Game saved with score {0}", PlayerData.bestScore));
        CloudSavedGame.OpenSavedGameThenSave();
    }
示例#2
0
 // Called after each Google Play Games authentication attempt
 public void AuthenticationCallback(bool success)
 {
     if (success)
     {
         Debug.Log("Play Games Authentication SUCCEEDED");
         DisplayLogoutButton();
         CloudSavedGame.OpenSavedGameThenLoad();
     }
     else
     {
         Debug.Log("Play Games Authentication FAILED");
         DisplayLoginButton();
     }
 }