| | |
| | | |
| | | public void Login() |
| | | { |
| | | if (null == VersionConfig.config) |
| | | { |
| | | throw new System.Exception("VersionConfig is null when Login, game will pause here"); |
| | | } |
| | | |
| | | appidRecorder = appid.text; |
| | | serverIdRecorder = serverId.text; |
| | | accountRecorder = account.text; |
| | |
| | | |
| | | if (!string.IsNullOrEmpty(appid.text)) |
| | | { |
| | | bool needRestore = VersionConfig.Get().m_AppId != appid.text; |
| | | VersionConfig.Get().m_AppId = appid.text; |
| | | bool needRestore = VersionConfig.config.m_AppId != appid.text; |
| | | VersionConfig.config.m_AppId = appid.text; |
| | | #if UNITY_EDITOR |
| | | //debug登录后第二次启动默认恢复test |
| | | if (needRestore) |
| | |
| | | |
| | | if (isToken.isOn) |
| | | { |
| | | // var loginModel = ModelCenter.Instance.GetModel<LoginModel>(); |
| | | // LoginManager.Instance.sdkLoginResult = new SDKUtils.FP_LoginOk() |
| | | // { |
| | | // account = account.text, |
| | | // token = password.text, |
| | | // tokenExpire = "1519750743000", |
| | | // phone = 0, |
| | | // accountID = 1000 |
| | | // }; |
| | | LoginManager.Instance.sdkLoginResult = new SDKUtils.FP_LoginOk() |
| | | { |
| | | account = account.text, |
| | | token = password.text, |
| | | tokenExpire = "1519750743000", |
| | | phone = 0, |
| | | accountID = 1000 |
| | | }; |
| | | |
| | | LoginManager.Instance.sdkLogined = true; |
| | | var ip = ServerListCenter.Instance.currentServer.region_domain; |
| | | var port = ServerListCenter.Instance.currentServer.login_port; |
| | | var port = ServerListCenter.Instance.currentServer.http_port; |
| | | var gamePort = ServerListCenter.Instance.currentServer.game_port; |
| | | if (!string.IsNullOrEmpty(serverId.text)) |
| | | { |