コード例 #1
0
        public void UpdateExternalAccountInfo(OnUpdateExternalAccountInfoResponseReceived callback)
        {
            this.updateCallback = callback;
            GetExternalAccountsCommand getExternalAccountsCommand = new GetExternalAccountsCommand(new PlayerIdRequest
            {
                PlayerId = Service.Get <CurrentPlayer>().PlayerId
            });

            getExternalAccountsCommand.AddSuccessCallback(new AbstractCommand <PlayerIdRequest, GetExternalAccountsResponse> .OnSuccessCallback(this.OnGetExternalAccountInfo));
            this.SendServerCommand(getExternalAccountsCommand, false);
        }
コード例 #2
0
 private void OnGetExternalAccountInfo(GetExternalAccountsResponse response, object cookie)
 {
     this.externalAccountInfo = response;
     if (this.facebookRegisterPending)
     {
         this.RegisterFacebookAccount();
         this.facebookRegisterPending = false;
     }
     if (this.gameServicesRegisterPending)
     {
         this.RegisterGameServicesAccount();
         this.gameServicesRegisterPending = false;
     }
     if (this.updateCallback != null)
     {
         this.updateCallback();
         this.updateCallback = null;
     }
 }