Exemple #1
0
    private void CheckMenuInput()
    {
        vAxis = Input.GetAxis("Vertical_1") + Input.GetAxis("Vertical_2")
                + Input.GetAxis("Vertical_4") + Input.GetAxis("Vertical_3");

        submit = Input.GetButton("Submit");

        if (vAxis <= 0)
        {
            if (!restartButton.GetIsFocused())
            {
                restartButton.Focus();
            }
            if (submit)
            {
                Restart();
                submit = false;
            }
        }
        else
        {
            if (!quitButton.GetIsFocused())
            {
                quitButton.Focus();
            }
            if (submit)
            {
                submit = false;
                Application.Quit();
            }
        }
    }