Esempio n. 1
0
    public void OnLoginClick()
    {
        GameObject inputGo     = GlobalRef.UIRoot.FindChild("panel_login/IptAccount/Text").gameObject;
        Text       accountText = inputGo.GetComponent <Text> ();

        Utility.Log("account:" + accountText.text);

        if (NetMgr.Instance.Init())
        {
            HandleMgr.Init();
            NetMgr.Instance.LoginToLoginServer("121.199.48.63", 4445, accountText.text, 3999);
            //NetMgr.Instance.LoginToLoginServer("192.168.0.75", 4444, accountText.text, 3999);
        }
    }
Esempio n. 2
0
    public void OnLoginClick()
    {
        /*   GameObject loadingPrefab = ABManager.get(AppConst.AB_LOGIN).LoadAsset ("LoadingPrefab") as GameObject;
         *         if (null == loadingPrefab)
         *         {
         *     Debug.LogError("load loadingprefab failed");
         *     //return;
         *         }
         */
        //GameObject loadingGo = GameObject.Instantiate (loadingPrefab);
        //loadingGo.transform.SetParent (this.transform.parent);

        // lua init: load the config data and cached role data ...
        if (MsgHandler.Instance.Init())
        {
            if (NetController.Instance.Init())
            {
                HandleMgr.Init();
                NetController.Instance.LoginToLoginServer("121.199.48.63", 8888);
                //NetController.Instance.LoginToLoginServer("192.168.0.75", 4444);
            }
        }
    }