Ejemplo n.º 1
0
        void QueryInput(float unscaledDeltaTime)
        {
            // Detect input for pause button (make sure no managed dialogs are shown, either).
            if ((NumManagedMenus <= 0) && (Input.GetButtonDown(PauseInput) == true))
            {
                // Attempt to grab the pause menu
                if (PauseMenu != null)
                {
                    if (PauseMenu.CurrentState == IMenu.State.Hidden)
                    {
                        PauseMenu.Show();

                        // Indicate button is clicked
                        ButtonClick.Play();
                    }
                    else if (PauseMenu.CurrentState == IMenu.State.Visible)
                    {
                        PauseMenu.Hide();

                        // Indicate button is clicked
                        ButtonClick.Play();
                    }
                }
            }
        }