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); }
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; } }