ArcadeRPG.Game1.Draw C# (CSharp) Method

Draw() protected method

This is called when the game should draw itself.
protected Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
return void
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            if (intro.isShowing())
            {
                spriteBatch.Begin();
                intro.Show(spriteBatch); // show intro screen until timer runs out
                spriteBatch.End();
            }
            else if (instruct.isShowing())
            {
                spriteBatch.Begin();
                instruct.Show(spriteBatch); // show instructions screen until user taps
                spriteBatch.End();
            }
            else if (instruct2.isShowing())
            {
                spriteBatch.Begin();
                instruct2.Show(spriteBatch); // show instructions screen until user taps
                spriteBatch.End();
            }
            else if (timex.isShowing())
            {
                spriteBatch.Begin();
                timex.Show(spriteBatch); // show time expired screen until user makes a selection / time runs out
                spriteBatch.End();
            }
            else if (gameover.isShowing()) // show game over screen for 5 seconds. game will exit back to the windows phone platform after this
            {
                spriteBatch.Begin();
                gameover.Show(spriteBatch);
                spriteBatch.End();
            }
            else // no menus displayed
            {
                spriteBatch.Begin();
                game_engine.Draw(gameTime, spriteBatch); // draw game contents according to UI, AI, time
                spriteBatch.End();
            }
            base.Draw(gameTime);
        }