| | |
| | | CrossServerOneVsOneLogin(); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | public void CrossServerOneVsOneLogin() |
| | |
| | | } |
| | | loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(15 * TimeSpan.TicksPerSecond), ProcessLoginFailure); |
| | | GameNetSystem.Instance.BeginConnectCrossServer(ipBuf, gamePortBuf, OnGameServerConnected); |
| | | |
| | | NetLinkWin.Show(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(15 * TimeSpan.TicksPerSecond), ProcessLoginFailure); |
| | | GameNetSystem.Instance.BeginConnectCrossServer(ipBuf, gamePortBuf, OnGameServerConnected); |
| | | |
| | | NetLinkWin.Show(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Debug.Log(ex); |
| | | busy = false; |
| | | } |
| | | } |
| | | |
| | | private void OnAccountLogin(bool _ok, string _result) |
| | | { |
| | | if (!_ok) |
| | | { |
| | | busy = false; |
| | | DebugEx.LogError(_result); |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(_result)) |
| | | { |
| | | busy = false; |
| | | return; |
| | | } |
| | | |
| | | var stringSet = _result.Split('|'); |
| | | if (stringSet[0] != "OK") |
| | | { |
| | | busy = false; |
| | | return; |
| | | } |
| | | |
| | | try |
| | | { |
| | | GameNetSystem.Instance.BeginConnectCrossServer(ipBuf, gamePortBuf, OnGameServerConnected); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | busy = false; |
| | | Debug.Log(ex); |
| | | } |
| | | } |
| | | |
| | |
| | | public void AccessLogin(H0101_tagServerPrepared _serverInfo) |
| | | { |
| | | GameNetSystem.Instance.SendToCrossServer(loginModel.Get0101SendPackage(_serverInfo)); // 登录 |
| | | NetLinkWin.Show(); |
| | | } |
| | | |
| | | public void CheckClientVersion() |
| | |
| | | var sendInfo = new C010D_tagCClientVersion(); |
| | | sendInfo.Version = "10.1000.1"; |
| | | GameNetSystem.Instance.SendToCrossServer(sendInfo); |
| | | NetLinkWin.Show(); |
| | | } |
| | | |
| | | public void OnGetPlayerLoginInfo(byte _type) |
| | | { |
| | | NetLinkWin.Hide(); |
| | | busy = false; |
| | | if (Application.internetReachability == NetworkReachability.NotReachable) |
| | | { |
| | |
| | | tagCRoleLoginAsk.ClientID = SDKUtility.Instance.RegistrationID; |
| | | GameNetSystem.Instance.SendToCrossServer(tagCRoleLoginAsk); |
| | | |
| | | NetLinkWin.Show(); |
| | | |
| | | if (loginOverTimeClock != null) |
| | | { |
| | | loginOverTimeClock.Stop(); |