Exemplo n.º 1
0
 void UpdateInfoBox()
 {
     if (currentlySelected != null)
     {
         RoomData data = currentlySelected.GetComponent <RoomData>();
         RoomInfoPanel.Enable();
         UsernameLabel.Text = data.Game.name;
         MapTypeLabel.Text  = "Map 1";
         GameModeLabel.Text = "Showdown";
         if (data.Game.playerCount < data.Game.maxPlayers)
         {
             OpenLabel.Text  = "Open";
             OpenLabel.Color = new Color32(0, 255, 0, 255);
             JoinButton.Enable();
             JoinButton.Click += new MouseEventHandler(JoinButton_Click);
         }
         else
         {
             OpenLabel.Text  = "Closed";
             OpenLabel.Color = new Color32(255, 0, 0, 255);
             JoinButton.Disable();
         }
     }
     else
     {
         RoomInfoPanel.Disable();
     }
 }