void OnGUI()
    {
        if (Debug.isDebugBuild)
        {
            GUI.contentColor        = Color.white;
            GUI.skin.label.fontSize = 20;
            GUI.Label(new Rect(10, 10, 500, 300), listen.getDebug());
            GUI.Label(new Rect(600, 10, 500, 300), "Connection Status " + WarpClient.GetInstance().GetConnectionState());
            //string text = "<b>Hello</b><color=red>World</color>";
            //GUI.Label (new Rect(20,20,100,100),text);
        }
        if (isConnected)
        {
            if (GUI.Button(new Rect(10, 20, 80, 50), "join room"))
            {
                WarpClient.GetInstance().JoinRoomInRange(0, 1, true);
                string RoomName = "Room" + UnityEngine.Random.Range(1, 1000).ToString();

                //WarpClient.GetInstance().CreateTurnRoom(RoomName,UserName,2,null,30);
            }
        }
    }
Exemple #2
0
 void OnGUI()
 {
     if (showCards)
     {
         //GUI.TextField(new Rect(100,100,50,200), "Here is your cards: " + getCards);
     }
     if (Debug.isDebugBuild)
     {
         GUI.contentColor        = Color.white;
         GUI.skin.label.fontSize = 20;
         GUI.Label(new Rect(10, 10, 500, 300), listen.getDebug());
         GUI.Label(new Rect(350, 10, 500, 300), "Connection Status " + WarpClient.GetInstance().GetConnectionState());
         //string text = "<b>Hello</b><color=red>World</color>";
         //GUI.Label (new Rect(20,20,100,100),text);
     }
     if (isConnected)
     {
         if (GUI.Button(new Rect(500, 200, 70, 30), "join room"))
         {
             WarpClient.GetInstance().JoinRoomInRange(0, 1, true);
         }
     }
 }