예제 #1
0
        /// <summary>
        /// Handles user input.
        /// </summary>
        public override void HandleInput()
        {
            bool resumeClicked = false;

            if (InputManager.IsButtonClicked(new Rectangle(
                                                 (int)(backPosition.X),
                                                 (int)(backPosition.Y),
                                                 (int)(backTexture.Width * ScaledVector2.DrawFactor),
                                                 (int)(backTexture.Height * ScaledVector2.DrawFactor))))
            {
                resumeClicked = true;
            }


            if (InputManager.IsActionTriggered(InputManager.Action.Back) || resumeClicked &&
                Session.IsActive)
            {
                Session.MapCache.Clear();
                AudioManager.PopMusic();
                ExitScreen();
                return;
            }

            base.HandleInput();
        }
        /// <summary>
        /// Handles user input.
        /// </summary>
        public override void HandleInput()
        {
            if (InputManager.IsActionTriggered(InputManager.Action.Back) &&
                Session.IsActive)
            {
                AudioManager.PopMusic();
                ExitScreen();
                return;
            }

            base.HandleInput();
        }
 void RewardsScreen_Exiting(object sender, EventArgs e)
 {
     AudioManager.PopMusic();
 }
예제 #4
0
 void LevelUpScreen_Exiting(object sender, EventArgs e)
 {
     AudioManager.PopMusic();
 }
예제 #5
0
 void GameOverScreen_Exiting(object sender, EventArgs e)
 {
     AudioManager.PopMusic();
 }