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); } }
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); } }