protected void Awake()
 {
     this.m_authSign = null;
     this.m_identity = null;
     this.m_verificationSignature = null;
     this.ChangeState(PlatformConnectState.Initializing);
     PlayGamesPlatform.InitializeInstance(new PlayGamesClientConfiguration.Builder().Build());
     PlayGamesPlatform.Activate();
 }
 public void Disconnect()
 {
     Log("Disconnect()");
     if (Social.localUser.authenticated)
     {
         PlayGamesPlatform.Instance.SignOut();
     }
     GameLogic.Binder.GameState.Player.IsDisconnectedFromPlatform = true;
     this.m_authSign = false;
     this.m_verificationSignature = null;
     this.m_identity = null;
     this.ChangeState(PlatformConnectState.Unconnected);
 }
 public void ReConnect()
 {
     this.m_state        = PlatformConnectState.Initializing;
     this.currentAccount = this.GetAccount();
     this.currentName    = this.GetName();
     if (this.currentAccount != null)
     {
         PlatformPlayerIdentity identity = new PlatformPlayerIdentity();
         identity.id       = this.currentAccount.playerId;
         identity.userName = this.currentName;
         this.m_identity   = identity;
         this.m_state      = PlatformConnectState.Connected;
         App.Binder.EventBus.PlatformProfileUpdated(PlatformConnectType.GameCenter, this.m_identity);
     }
     else
     {
         this.m_state = PlatformConnectState.Unconnected;
     }
 }
 private void onAuthenticated(bool success)
 {
     if (success)
     {
         PlatformPlayerIdentity identity = new PlatformPlayerIdentity();
         identity.id       = Social.localUser.id;
         identity.userName = Social.localUser.userName;
         identity.isFriend = false;
         this.m_identity   = identity;
         Log("Locally connected " + this.m_identity.id);
         this.ChangeState(PlatformConnectState.Connected);
         this.m_authSign = true;
         App.Binder.EventBus.PlatformProfileUpdated(PlatformConnectType.GooglePlay, this.m_identity);
     }
     else
     {
         GameLogic.Binder.GameState.Player.IsDisconnectedFromPlatform = true;
         this.ChangeState(PlatformConnectState.Unconnected);
         this.m_identity = null;
         this.m_authSign = false;
     }
 }
 public void Disconnect()
 {
     this.m_identity = null;
     this.m_state    = PlatformConnectState.Unconnected;
 }