Beispiel #1
0
    public override GameObject OnLobbyServerCreateLobbyPlayer(NetworkConnection conn, short playerControllerId)
    {
        GameObject  obj       = Instantiate(lobbyPlayerPrefab.gameObject) as GameObject;
        LobbyPlayer newPlayer = obj.GetComponent <LobbyPlayer>();

        for (int i = 0; i < lobbySlots.Length; ++i)
        {
            LobbyPlayer p = (LobbyPlayer)lobbySlots[i];
            if (p != null)
            {
                p.isLocalLobbyPlayer();
            }
        }
        return(obj);
    }