Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (Fidd >= 1 && !IsInvoking("SneakOut"))
     {
         CancelInvoke("MoveLine");
         InvokeRepeating("SneakOut", 0, 0);
     }
     if (Ah <= 0.5)
     {
         SceneSwitch.GetSceneSwitch().Switch(GameScene.Lobby);
         CancelInvoke("SeakOut");
         m_Login.GetComponent <GetIntoLobby>().enabled = false;
     }
 }
Beispiel #2
0
    private void LoginEventCallback(EventBase eb)
    {
        Debug.Log("LoginEventCallback");
        string eventname = eb.eventName;
        object obj       = eb.eventValue;

        if (CGNetConst.ROUTE_QUICKLOGIN.Equals(eventname))
        {
            if (obj != null)
            {
                CommonResult <LoginData> commonResult = (CommonResult <LoginData>)obj;
                if (commonResult.errcode == -1)
                {
                    Debug.Log("PlayerBase.data =" + commonResult.data.playerData);
                    int status = commonResult.data.loginStatus;
                    PublicTimer.ResetServerTime(commonResult.data.curTime);
                    //PlayerDataManager.GetInstance().GUID = commonResult.GUID;
                    PlayerDataManager.GetInstance().SetPlayerInfo(commonResult.data.playerData);

                    //PlayerDataManager.GetInstance().SetPlayerInfo(commonResult.data.player);
                    switch (status)
                    {
                    case 0:     //新注册用户
                        Debug.Log("新注册用户");
                        break;

                    case 1:    //登录成功
                        Debug.Log("登录成功");
                        break;

                    default:
                        break;
                    }
                    SceneSwitch.GetSceneSwitch().Switch(GameScene.Lobby);
                }
            }
        }
    }