Ejemplo n.º 1
0
        private IEnumerator WaitForRequestRoom() // 방 정보 받는 코루틴
        {
            WWWForm form = new WWWForm();

            form.AddField("gamecode", GameManager.instance.GameCode);
            UnityWebRequest www = UnityWebRequest.Post(m_roomUrl, form);

            yield return(www.SendWebRequest());

            if (www.isNetworkError || www.isHttpError)
            {
                Debug.Log(www.error);
            }
            else
            {
                Debug.Log(www.downloadHandler.text);
                m_isRoomData = true;
                m_roomData   = JsonUtility.FromJson <room>(www.downloadHandler.text);
                m_dCallBack();
            }
        }
Ejemplo n.º 2
0
 public void GetRoomData() // 방 정보 가져오기 Web통신
 {
     m_roomData = null;
     StartCoroutine(WaitForRequestRoom());
     StartCoroutine(WaitForRequestJackpot());
 }