/// <summary> /// 用于自动重连后自动登录 /// </summary> /// <param name="msg"></param> private static void SendLoginMsg(UserLogin2Server msg = null) { reSendTimer = c_reSendTimer; bool reLoginState = false; if (msg != null) { loginMsg = msg; } else { if (loginMsg == null) { return; } else { if (IsLogin) { reLoginState = true; } } } loginMsg.reloginState = reLoginState; Debug.Log("SendLoginMsg -->" + reLoginState); JsonMessageProcessingController.SendMessage(loginMsg); }
private static void SDKLoginCallBack(OnLoginInfo info) { SDKManager.LoginCallBack -= SDKLoginCallBack; if (OnSDKLoginCallBack != null) { OnSDKLoginCallBack(info); } if (info.isSuccess) { UserLogin2Server msg = UserLogin2Server.GetLoginMessage(info.loginPlatform, info.accountId, info.password); SendLoginMsg(msg); } }
public static UserLogin2Server GetLoginMessage(LoginPlatform loginType, String typeKey, String pw) { UserLogin2Server msg = new UserLogin2Server(); msg.loginType = loginType; msg.typeKey = typeKey; msg.pw = pw; msg.deviceUniqueIdentifier = SystemInfo.deviceUniqueIdentifier; msg.platform = Application.platform; msg.deviceSystemLanguage = Application.systemLanguage; return(msg); }
private static void SDKLoginCallBack(OnLoginInfo info) { SDKManager.LoginCallBack -= SDKLoginCallBack; if (OnSDKLoginCallBack != null) { OnSDKLoginCallBack(info); } if (info.isSuccess) { isClickLogin = true; PlayerLoginPlatform = info.loginPlatform; UserLogin2Server msg = UserLogin2Server.GetLoginMessage(info.loginPlatform, info.accountId, info.password, activationCode); SendLoginMsg(msg); } }
public static UserLogin2Server GetLoginMessage(LoginPlatform loginType, String typeKey, String pw, string activationCode) { UserLogin2Server msg = new UserLogin2Server(); msg.loginType = loginType; msg.typeKey = typeKey; msg.pw = pw; msg.activationCode = activationCode; msg.deviceUniqueIdentifier = SystemInfoManager.deviceUniqueIdentifier; msg.platform = Application.platform; msg.deviceSystemLanguage = Application.systemLanguage; msg.clientVersion = ApplicationManager.Version; msg.clientUseLanguage = LanguageManager.CurrentLanguage; return(msg); }