public override void SetData(params object[] paramsObjects) { _loginCallbackType = LoginCallbackType.None; if (paramsObjects.Length > 0) { _loginCallbackType = (LoginCallbackType)paramsObjects[0]; } }
/// <summary> /// 账号中心登陆成功 /// </summary> /// <param name="loginCallbackType">登陆的各种情况</param> private void OnAccountCenterLogin(LoginCallbackType loginCallbackType) { Debug.LogError("loginCallbackType====>" + loginCallbackType); switch (loginCallbackType) { case LoginCallbackType.Success: Debug.LogWarning("---- --------------------------------------回调函数,登录成功 ----"); SuccessSet(); //第一次进入游戏是自动登录 // Debug.LogError("SdkHelper.AccountAgent.IsAutoLogin===>"+SdkHelper.AccountAgent.IsAutoLogin); // if (SdkHelper.AccountAgent.IsAutoLogin) // { // if (Channel.IsTencent) // { // view.ShowLoginEntrance(true); // view.HideTencent(); // } // break; // } byte[] buffer = NetWorkManager.GetByteData(new LoginReq { Account = SdkHelper.AccountAgent.AccountId, Pwd = SdkHelper.AccountAgent.Token, Channel = AppConfig.Instance.channel, ChannelInfo = AppConfig.Instance.channelInfo, ClientVersion = AppConfig.Instance.versionName, Language = AppConfig.Instance.language, MobileOs = Application.platform == RuntimePlatform.IPhonePlayer ? 1 : 0 }); NetWorkManager.Instance.Send <LoginRes>(CMD.LOGINC_LOGIN, buffer, OnAccountLogin, OnAccountLoginError); break; case LoginCallbackType.Fail: FailSet(); break; case LoginCallbackType.Logout: break; case LoginCallbackType.Switch: break; case LoginCallbackType.UserCenter: break; } _currentLoginState = loginCallbackType; }
public void SetData(LoginCallbackType isCallbackTypeSwich) { _isCallbackTypeSwitch = isCallbackTypeSwich; }
public void SetData(LoginCallbackType loginCallbackType) { _currentLoginState = loginCallbackType; }