Ejemplo n.º 1
0
    void onOKClick()
    {
        //if (!isLoadConfig)
        //{
        //    Debug.LogWarning("Config is not Loading finish. return click action");
        //    return;
        //}

        if (Account == "")
        {
            SetErrorTips(CommonFunction.GetConstString("LOGIN_TIPS"));
            return;
        }
        if (_ui.lblServerLabel.text == "")
        {
            SetErrorTips(CommonFunction.GetConstString("LOGIN_SEVER_QUEST"));
            return;
        }
        if (GameSystem.Instance.mNetworkManager.m_loginConn == null)
        {
            isConnect = false;
        }

#if IOS_SDK || ANDROID_SDK
        if (GameSystem.Instance.mNetworkManager.m_loginConn != null)
        {
            isConnect = true;
        }
#endif

        bool verifyOk = true;
        if (isConnect)
        {
            verifyOk = LoginNetwork.Instance.VerifyCDKeyReq();
        }
        else
        {
            ConnectLoginServer();
        }

        if (verifyOk)
        {
            GameSystem.Instance.mNetworkManager.isReconnecting = false;
            _isLogin = true;
//            _ui.goServer.SetActive(false);
            _ui.ButtonOK.GetComponent <UIButton>().enabled = false;
//            _ui.ButtonOK.gameObject.SetActive(false);
//            _ui.InputAccount.gameObject.SetActive(false);
        }
        UIWait.ShowWait();
    }
Ejemplo n.º 2
0
    public void onChangeServer(GameObject go)
    {
        if (_isLogin)
        {
            return;
        }
        //if (!isLoadConfig)
        //{
        //    Debug.LogWarning("Config is not Loading finish. return click action");
        //    return;
        //}
#if ANDROID_SDK
        if (!MainPlayer.Instance.SDKLogin)
        {
            onInputClick(go);
            return;
        }
#endif

        if (_ui.lblText.text == "")
        {
            SetErrorTips(CommonFunction.GetConstString("LOGIN_TIPS"));
            return;
        }

        if (GameSystem.Instance.mNetworkManager.m_loginConn == null)
        {
            isConnect = false;
        }

        if (isConnect)
        {
            LoginNetwork.Instance.ServerInfoReq();
        }
        isGetServerList = true;
        ConnectLoginServer();
        UIWait.ShowWait();
    }
Ejemplo n.º 3
0
 /// <summary>
 /// Shows the wait ui .
 /// </summary>
 public static void ShowWait()
 {
     UIWait.ShowWait();
 }