示例#1
0
 /// <summary>
 /// Makes sure that the currently active game state calls Draw.
 /// </summary>
 /// <param name="gameTime">An object containing information about the time that has passed in the game.</param>
 /// <param name="spriteBatch">A sprite batch object used for drawing sprites.</param>
 public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
 {
     if (currentGameState != null)
     {
         currentGameState.Draw(gameTime, spriteBatch);
     }
 }
        protected override void Draw(GameTime gameTime)
        {
            GameState.Draw(gameTime);

            base.Draw(gameTime);
        }
示例#3
0
 public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
 {
     _current.Draw(gameTime, spriteBatch);
 }
 public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
 {
     currentGameState?.Draw(gameTime, spriteBatch);
 }