Example #1
0
    public void StartGame()
    {
        MainMenu.SetActive(false);

        HostMenu.SetActive(false);

        ConnectMenu.SetActive(false);

        SceneManager.LoadScene("__TEST__");
    }
Example #2
0
    void Start()
    {
        Instance = this;

        MainMenu.SetActive(true);

//		for ( int i = 0; i < this.MainMenu.transform.childCount; i++ )
//			this.MainMenu.transform.GetChild ( i ).gameObject.SetActive ( true );

        HostMenu.SetActive(false);

        ConnectMenu.SetActive(false);

        DontDestroyOnLoad(gameObject);
    }
Example #3
0
    public void BACK_BUTTON()
    {
        MainMenu.SetActive(true);

        HostMenu.SetActive(false);

        ConnectMenu.SetActive(false);

        Server s = FindObjectOfType <Server> ();

        if (s != null)
        {
            s.server.Stop();
            Destroy(s.gameObject);
        }

        Client c = FindObjectOfType <Client> ();

        if (c != null)
        {
            c.socket.Close();
            Destroy(c.gameObject);
        }
    }