示例#1
0
 public override void OnStartClient()
 {
     base.OnStartClient();
     lm             = GameObject.FindObjectOfType <LobbyManager>();
     lobbyName      = lm.createLobbyPlayerName(this);
     lobbyName.text = playerName;
     if (readyToBegin)
     {
         lobbyName.text = playerName + readyString;
     }
     lobbyName.color = color;
 }
示例#2
0
    public LobbyPlayerName createLobbyPlayerName(RoomPlayer player)
    {
        LobbyPlayerName lobbyName = Instantiate(playerLobbyNamePrefab, playerListPanel.transform).GetComponent <LobbyPlayerName>();

        if (!isServer)
        {
            players.Add(player);
        }
        RectTransform t = lobbyName.gameObject.GetComponent <RectTransform>();

        t.position -= t.up * t.rect.height * (players.Count - 1);
        return(lobbyName);
    }