Ejemplo n.º 1
0
    public IEnumerator UpdateRoomList(List <RoomInfo> newList)
    {
        foreach (RoomInfo ri in newList)
        {
            RoomUI newUI = Instantiate(roomObjectUI);
            newUI.SetLabels(ri.Name, ri.MaxPlayers, ri.PlayerCount);
            newUI.transform.parent = availableLobbies.content;

            yield return(null);
        }
    }
Ejemplo n.º 2
0
 private void Update()
 {
     //Debug creating labels
     if (Input.GetKey(KeyCode.Space))
     {
         RoomUI next    = Instantiate(roomObjectUI);
         byte   tempMax = (byte)Random.Range(0, 30);
         next.SetLabels(Random.Range(-1000, 1000).ToString(), tempMax);
         next.gameObject.transform.parent = availableLobbies.content;
     }
 }