示例#1
0
    public void RebuildPlayerListName()
    {
        foreach (KeyValuePair <Guid, GameObject> item in listItems1)
        {
            LobbyPlayerListItem i = item.Value.GetComponent <LobbyPlayerListItem>();

            i.SetName(roomPlayers1[item.Key].GetName());
        }
    }
示例#2
0
    public void RebuildPlayerListReady()
    {
        foreach (KeyValuePair <Guid, GameObject> item in listItems1)
        {
            LobbyPlayerListItem i = item.Value.GetComponent <LobbyPlayerListItem>();

            Debug.Log(i.Name.text + " : " + i.ReadyState.text);

            i.SetReadyState(roomPlayers1[item.Key].IsReady);
        }
    }
示例#3
0
    /// <summary>
    /// Used to update a list item tied to a particular player.
    /// allows ready state display to be changed
    /// </summary>
    /// <param name="player"></param>
    public void UpdateListItem(NetworkRoomPlayerExt player)
    {
        foreach (KeyValuePair <Guid, NetworkRoomPlayerExt> pair in roomPlayers1)
        {
            Debug.Log(pair.Key + "   :   " + pair.Value.GetName());
        }

        try
        {
            LobbyPlayerListItem toUpdate = listItems1[player.id].GetComponent <LobbyPlayerListItem>();
            //Update ListItem Name
            toUpdate.SetName(player.GetName());
            //Update ListItem readystate
            toUpdate.SetReadyState(player.IsReady);
        }
        catch (KeyNotFoundException e)
        {
            Debug.Log("!!!!!!!!!!!!!!CANT FIND KEY!!!!!!!!!!!!");
        }

        //RebuildPlayerList();
    }