public void StartGame() { MainMenu.SetActive(false); HostMenu.SetActive(false); ConnectMenu.SetActive(false); SceneManager.LoadScene("__TEST__"); }
// Use this for initialization void Start() { cm = GetComponent <ConnectMenu>(); isPaused = true; resolutions = Screen.resolutions; resolutionIndex = (resolutions.Length - 1) / 2; QualityNames = QualitySettings.names; playerList = true; enableHelper = GameObject.FindWithTag("EnableHelper").gameObject; }
void Start () { System.Random rand = new System.Random(); NameInputField.GetComponent<InputField>().text = "Player_" + rand.Next(9999); Instance = this; MainMenu.SetActive ( true ); // for ( int i = 0; i < this.MainMenu.transform.childCount; i++ ) // this.MainMenu.transform.GetChild ( i ).gameObject.SetActive ( true ); ConnectMenu.SetActive ( false ); DontDestroyOnLoad ( gameObject ); }
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); }
public void BACK_BUTTON () { MainMenu.SetActive ( true ); 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 ); } }