public void RemovePlayerName(string playerName, RoomPlayerCustom id)
    {
        if (playerNames.ContainsKey(id))

        {
            Debug.Log("RemovePlayerName");
            playerNames.Remove(id);
        }
    }
Exemplo n.º 2
0
 public void ChangePlayerName(string newName, RoomPlayerCustom rpCustom)
 {
     if (networkRoomPlayer)
     {
         networkManager.AddPlayerName(newName, rpCustom);
     }
     else
     {
         Debug.Log("Failed to update player name");
     }
 }
 public bool AddPlayerName(string playerName, RoomPlayerCustom id)
 {
     Debug.Log("AddPlayerName");
     if (playerNames.ContainsValue(playerName))
     {
         return(false);
     }
     else
     {
         playerNames[id] = playerName;
         id.playerName   = playerName;
         PlayerNamesChanged?.Invoke();
         return(true);
     }
 }
Exemplo n.º 4
0
 public void SetRoomPlayer(RoomPlayerCustom netid)
 {
     networkRoomPlayer = netid;
 }