Beispiel #1
0
    // 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;
        }
    }
Beispiel #2
0
    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;
        }
    }
Beispiel #4
0
    // 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;
        }
    }