// Update is called once per frame void Update() { switch (scrollRect.GetSelectedImage()) { case 0: gameObject.GetComponent <Text>().text = "CREATE GAME"; break; case 1: gameObject.GetComponent <Text>().text = "JOIN GAME"; break; default: break; } }
public void EnterButtonClicked() { switch (scrollRect.GetSelectedImage()) { case 0: SceneManager.LoadScene("CreategameScene"); break; case 1: FindObjectOfType <ConnectionDiscovery>().StartListening(); // Start listening for games SceneManager.LoadScene("JoingameScene"); break; default: break; } }
public void EnterButtonClicked() { switch (scrollRect.GetSelectedImage()) { case 0: break; case 1: SceneManager.LoadScene("MultiplayerScene"); break; case 2: SceneManager.LoadScene("SettingsScene"); break; default: break; } }
// Update is called once per frame void Update() { switch (scrollRect.GetSelectedImage()) { case 0: gameObject.GetComponent <Text>().text = "SINGLEPLAYER"; break; case 1: gameObject.GetComponent <Text>().text = "MULTIPLAYER"; break; case 2: gameObject.GetComponent <Text>().text = "SETTINGS"; break; default: break; } }