protected void onAnomalyEvnet(C_BasePacket curevent) { C_Anomaly data = (C_Anomaly)curevent; switch (data.m_type) { case AnomalyType.loginServer_Reconnect: m_waitReconnectUI.SetActive(false); break; case AnomalyType.loginServer_Disconnect: #if NOTLOGINSERVER return; #endif m_waitReconnectUI.SetActive(true); //m_uiList[m_uiIndexStack.Peek()].stopWaitingUI(); m_uiList[m_uiIndexStack.Peek()].releaseUI(); m_uiList[m_uiIndexStack.Peek()].closeUI(1); break; case AnomalyType.mainServer_Reconnect: break; case AnomalyType.mainServer_Disconnect: while (m_uiIndexStack.Count > 1) { closeUI(1); } //openUI((int)INDEX_OF_CONTROLLER_UI.LOGIN_UI); m_uiList[m_uiIndexStack.Peek()].releaseUI(); GameManager.m_Instance.connect_loginServer(); break; } }
public void closeOkMsgUI() { m_okMsgObj.SetActive(false); // if (m_clearWaitingFUNC == null || m_clearWaitingFUNC() == false) { return; } C_Anomaly anomaly = new C_Anomaly(); if (GameManager.m_Instance.isConnectedMainServer()) { GameManager.m_Instance.disconnect_mainServer(); GameManager.m_Instance.setConnectStateMainServer(false, true); } else if (GameManager.m_Instance.isConnectedLoginServer()) { GameManager.m_Instance.disconnect_loginServer(); GameManager.m_Instance.setConnectStateLoginServer(false, true); } m_overTimeFunc?.Invoke(); }
public void setConnectStateMainServer(bool bConnected, bool bAnomaly) { //m_Text.text += ("Main::" + bConnected + "//"); m_bConnectedMainServer = bConnected; if (bAnomaly) { C_Anomaly data = new C_Anomaly(); AnomalyType anomalyType; if (m_bConnectedMainServer) { // wait connect ui close anomalyType = AnomalyType.mainServer_Reconnect; } else { // wait connect ui open anomalyType = AnomalyType.mainServer_Disconnect; setLoginState(false); } data.setType(anomalyType); makeUiEvent(data); } }