Esempio n. 1
0
    public void HostGameRelay()
    {
        if (networkManagerObject)
        {
            connectedPlayersCanvas.SetActive(true);

            NetworkedGameManager_Script nm = networkManagerObject.GetComponent <NetworkedGameManager_Script>();

            nm.SetPort();

            nm.StartHost();
        }
    }
Esempio n. 2
0
    public void JoinGameRelay()
    {
        if (networkManagerObject)
        {
            connectedPlayersCanvas.SetActive(true);

            NetworkedGameManager_Script nm = networkManagerObject.GetComponent <NetworkedGameManager_Script>();

            nm.SetIpAddress(GameObject.Find("IP Input Field").GetComponent <InputField>().text);
            nm.SetPort();

            nm.StartClient();
        }
    }
    public void HostGameRelay()
    {
        if (networkManagerObject)
        {
            NetworkedGameManager_Script nm = networkManagerObject.GetComponent <NetworkedGameManager_Script>();

            nm.SetPort();

            nm.StartHost();

            startJoinPanelObject.SetActive(false);
            ipFieldObject.GetComponent <InputField>().text         = Network.player.ipAddress.ToString();
            ipFieldObject.GetComponent <InputField>().interactable = false;
            cancelConnectionButtonObject.SetActive(true);
            connectedPlayersCanvas.SetActive(true);
        }
    }
    public void JoinGameRelay()
    {
        if (networkManagerObject)
        {
            NetworkedGameManager_Script nm = networkManagerObject.GetComponent <NetworkedGameManager_Script>();

            nm.SetIpAddress(GameObject.Find("IP Input Field").GetComponent <InputField>().text);
            nm.SetPort();

            nm.StartClient();

            startJoinPanelObject.SetActive(false);
            ipFieldObject.GetComponent <InputField>().text         = nm.networkAddress.ToString();
            ipFieldObject.GetComponent <InputField>().interactable = false;
            cancelConnectionButtonObject.SetActive(true);
            connectedPlayersCanvas.SetActive(true);
        }
    }