Esempio n. 1
0
    public IEnumerator TryLogin(string id, string pw)
    {
        string auth = "";

        yield return(httpNet.RequestHttpLoginOrCreateUser(id, pw, (L) => { auth = L; }));

        if (auth == "")
        {
            Debug.Log("LoginServer Fail");
            //AppManager.GetInstance().currentStateTrigger = AppManager.State.LOGIN_FAILED;
        }
        else
        {
            var pkt = new Packet.GAMESEVER_REQ_GAMESERVER_ENTER();

            pkt.ID           = id;
            pkt.AuthToken    = auth;
            pkt.GameServerID = AppManager.GetInstance().GameServerID;

            NetworkManager.GetInstance().tcpipNetwork.SendPacket(pkt, Packet.PacketId.ID_GAMESEVER_REQ_GAMESERVER_ENTER);
        }
    }
Esempio n. 2
0
    public IEnumerator TryLogin(string id, string pw)
    {
        string auth = "";

        yield return(httpNet.RequestHttpLoginOrCreateUser(id, pw, (L) => { auth = L; }));

        if (auth == "")
        {
            Debug.Log("LoginServer Fail");
            appManager.loginCanvasStatetext.text = appManager.loginFailStr;
        }
        else
        {
            Debug.Log("LoginServer success");
            AuthToken = auth;
            var pkt = new Packet.GAMESEVER_REQ_GAMESERVER_ENTER();

            pkt.ID           = id;
            pkt.AuthToken    = auth;
            pkt.GameServerID = AppManager.GetInstance().GameServerID;

            NetworkManager.GetInstance().tcpipNetwork.SendPacket(pkt, Packet.PacketId.ID_GAMESEVER_REQ_GAMESERVER_ENTER);
        }
    }