Exemple #1
0
 private void Start()
 {
     //sets the network manager
     networkManager = FindObjectOfType <NetworkManagerLobby>();
     //RoomManager = FindObjectOfType<NetworkRoomPlayer>();
     //self = this.gameObject;
 }
 public void HostLobby()
 {
     if (networkManager == null)
     {
         networkManager = FindObjectOfType <NetworkManagerLobby>();
     }
     networkManager.StartHost();
     landingPagePanel.SetActive(false);
 }
Exemple #3
0
    void Start()
    {
        networkManager = FindObjectOfType <NetworkManagerLobby>();
        playerLobbies  = networkManager.GamePlayers;
        int count = 0;

        foreach (var item in playerLobbies)
        {
            scoreBoardText[count].gameObject.SetActive(true);
            scoreBoardText[count].text = item.DisplayName + " Score: 0";
            playerScore[count].name    = item.DisplayName;
            count++;
        }
        UpdateScoreBoard();
    }
        // Updated by Kyle | May 25, 2021
        private void Start()
        {
            networkManager = (NetworkManagerLobby.singleton as NetworkManagerLobby);

            foreach (GameObject g in Menus)
            {
                g.SetActive(false);
            }
            Menus[0].SetActive(true);

            //grab public ip
            string[] webstring = new WebClient().DownloadString("http://ip4only.me/api/").Trim().Split(',');
            publicIp    = webstring[1];
            ipText.text = publicIp;

            //set references in network Manager
            networkManager.parentForListings = parentForListings;
        }
 private void Awake()
 {
     game = FindObjectOfType <NetworkManagerLobby>();
 }
 void Start()
 {
     networkManager = FindObjectOfType <NetworkManagerLobby>();
 }