public void AddPlayer(PlayerLobby player) { if (players.Contains(player)) { return; } players.Add(player); if (playerListContentTransform != null) { player.transform.SetParent(playerListContentTransform, false); RectTransform playerRect = player.GetComponent <RectTransform>(); playerRect.sizeDelta = new Vector2(playerListContentTransform.rect.width, playerRect.sizeDelta.y); playerListContentTransform.sizeDelta = new Vector2(playerListContentTransform.sizeDelta.x, players.Count * playerRect.sizeDelta.y); } if (addButtonRow != null) { addButtonRow.transform.SetAsLastSibling(); } PlayerListModified(); }
void Awake() { lobbyPlayer = GetComponent<NetworkLobbyPlayer>(); playerUI = GetComponent<PlayerLobby>(); }
public void RemovePlayer(PlayerLobby player) { players.Remove(player); PlayerListModified(); }
void Awake() { lobbyPlayer = GetComponent <NetworkLobbyPlayer>(); playerUI = GetComponent <PlayerLobby>(); }
public SingleGame(PlayerLobby activeLobby) { _started = false; MyPlayers = new List <Player>(); MyPlayers = activeLobby.Player; }
public void RemovePlayer(){ player = null; titleText.text = "No Player"; }
public void SetPlayer(PlayerLobby play){ player = play; titleText.text = "Player " + play.slot; }
public void RemovePlayer(PlayerLobby player) { player.RemovePlayer(); }
public override void OnLobbyServerSceneLoadedForPlayer(NetworkManager manager, GameObject lobbyPlayer, GameObject gamePlayer) { PlayerLobby lobby = lobbyPlayer.GetComponent <PlayerLobby>(); }