Наследование: UnityEngine.Networking.NetworkLobbyPlayer, IPlayerAction
Пример #1
0
    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();
    }
Пример #2
0
	void Awake()
	{
		lobbyPlayer = GetComponent<NetworkLobbyPlayer>();
		playerUI = GetComponent<PlayerLobby>();
	}
Пример #3
0
 public void RemovePlayer(PlayerLobby player)
 {
     players.Remove(player);
     PlayerListModified();
 }
Пример #4
0
 void Awake()
 {
     lobbyPlayer = GetComponent <NetworkLobbyPlayer>();
     playerUI    = GetComponent <PlayerLobby>();
 }
 public SingleGame(PlayerLobby activeLobby)
 {
     _started  = false;
     MyPlayers = new List <Player>();
     MyPlayers = activeLobby.Player;
 }
Пример #6
0
	public void RemovePlayer(){
		player = null;
		titleText.text = "No Player";
	}
Пример #7
0
	public void SetPlayer(PlayerLobby play){
		player = play;
		titleText.text = "Player " + play.slot;
	}
Пример #8
0
 public void RemovePlayer(PlayerLobby player)
 {
     player.RemovePlayer();
 }
Пример #9
0
 public override void OnLobbyServerSceneLoadedForPlayer(NetworkManager manager, GameObject lobbyPlayer, GameObject gamePlayer)
 {
     PlayerLobby lobby = lobbyPlayer.GetComponent <PlayerLobby>();
 }