Exemplo n.º 1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);
            if (mainMenu != null && _GlobalState == GlobalGameState.MainMenu)
            {
                mainMenu.Draw(spriteBatch);
            }
            if (gameState != null && _GlobalState == GlobalGameState.Game)
            {
                gameState.Draw(spriteBatch);
            }
            spriteBatch.Begin(SpriteSortMode.BackToFront);
            Menu.Draw(spriteBatch);
            LoadingBr.Draw(spriteBatch);
            spriteBatch.End();

            base.Draw(gameTime);
        }