MrGravity.LevelSelect.Update C# (CSharp) Method

Update() public method

Handle any changes while on the level selection menu
public Update ( GameTime gameTime, GameStates &gameState, Level &currentLevel ) : void
gameTime Microsoft.Xna.Framework.GameTime Current time within the game
gameState GameStates Current gamestate of the game
currentLevel Level Current level of the game
return void
        public void Update(GameTime gameTime, ref GameStates gameState, ref Level currentLevel)
        {
            HandleDirectionKeys();

            if(_mControls.IsAPressed(false)||_mControls.IsStartPressed(false))
                HandleAPressed(ref gameState,ref currentLevel);

            if (_mControls.IsBackPressed(false) || _mControls.IsBPressed(false))
            {
                gameState = GameStates.MainMenu;
                _mCurrentPage = 0;
                _mCurrentIndex = 1;
            }
        }