public void ShowUIForm(uint param = 0) { if (isInitialized == false) { Initialize(); } if (goUI) { UIForm form = goUI.GetComponent <UIForm>(); GameSystem.Instance.mClient.mUIManager.ShowUIForm(form, UIForm.ShowHideDirection.none); GuideSystem.Instance.Init(); } UIWait.StopWait(); }
public void OnLoginFailed() { _isLogin = false; _isInput = false; UIButton btnScprit = null; if (_ui != null) { btnScprit = _ui.ButtonOK.GetComponent <UIButton>(); } if (btnScprit != null) { btnScprit.enabled = true; } UIWait.StopWait(); }
public static void StopWait() { UIWait.StopWait(); }
public void OnEvent(NetworkConn.NetworkEvent nEvent, NetworkConn sender) { Debug.Log("Network Event -- sender.m_type: " + sender.m_type + " nEvent: " + nEvent); switch (sender.m_type) { case NetworkConn.Type.eLoginServer: { if (nEvent == NetworkConn.NetworkEvent.disconnected) { if (connLogin) { connLogin = false; } UIWait.StopWait(); } else if (nEvent == NetworkConn.NetworkEvent.connected) { if (connLogin == false) { connLogin = true; if (onServerConnected != null) { onServerConnected(NetworkConn.Type.eLoginServer); } #if IOS_SDK || ANDROID_SDK Debug.Log("IsReconnecting: " + isReconnecting); Debug.Log("MainPlayer.Instance.SDkLogin +" + MainPlayer.Instance.SDKLogin); Debug.Log("LoginNetwork.Instance.isVerifySDK =" + LoginNetwork.Instance.isVerifySDK); if (isReconnecting) { LoginNetwork.Instance.VerifyCDKeyReq(); } else if (MainPlayer.Instance.SDKLogin && !LoginNetwork.Instance.isVerifySDK) { Debug.Log("VerifySDK in NetworkManger"); LoginNetwork.Instance.isVerifySDK = true; LoginNetwork.Instance.VerifySDKReq(); } #else if (GameSystem.Instance.mClient.mUIManager.LoginCtrl.isGetServerList || LoginIDManager.GetPlatServerID() == 0) { LoginNetwork.Instance.ServerInfoReq(); GameSystem.Instance.mClient.mUIManager.LoginCtrl.isGetServerList = false; } else if (GameSystem.Instance.mClient.mUIManager.LoginCtrl.isSetLastServer) { LoginNetwork.Instance.ServerInfoReq(); GameSystem.Instance.mClient.mUIManager.LoginCtrl.isSetLastServer = false; } else { LoginNetwork.Instance.VerifyCDKeyReq(); } #endif } } else if (nEvent == NetworkConn.NetworkEvent.connectFail) { connLogin = false; OnConnectFailed(sender); if (GameSystem.Instance.mClient.mUIManager.LoginCtrl != null) { GameSystem.Instance.mClient.mUIManager.LoginCtrl.OnLoginFailed(); } } } break; case NetworkConn.Type.ePlatformServer: { UIWait.StopWait(); Debug.Log("connPlat:" + connPlat); if (nEvent == NetworkConn.NetworkEvent.disconnected) { if (connPlat) { connPlat = false; OnDisconnected(sender); if (PlatNetwork.Instance.onDisconnected != null) { PlatNetwork.Instance.onDisconnected(); } } } else if (nEvent == NetworkConn.NetworkEvent.connected) { if (connPlat == false) { connPlat = true; if (onServerConnected != null) { onServerConnected(NetworkConn.Type.ePlatformServer); } PlatNetwork.Instance.EnterPlatReq(); } else { Debug.Log("Warning: Platform server already connected."); } } else if (nEvent == NetworkConn.NetworkEvent.connectFail) { connPlat = false; OnConnectFailed(sender); } } break; case NetworkConn.Type.eVirtualServer: case NetworkConn.Type.eGameServer: { UIWait.StopWait(); Debug.Log("connGS:" + connGS); if (nEvent == NetworkConn.NetworkEvent.disconnected) { if (connGS) { connGS = false; } } else if (nEvent == NetworkConn.NetworkEvent.connected) { if (connGS == false) { connGS = true; if (onServerConnected != null) { onServerConnected(NetworkConn.Type.eGameServer); } } else { Debug.Log("Warning: GameServer server already connected."); } } else if (nEvent == NetworkConn.NetworkEvent.connectFail) { connGS = false; } } break; } }