/// <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) { // Start drawing . spriteBatch.Begin(); for (int i = 0; i < SpritesForDrawList.Count; i++) { SpritesForDrawList.GetElement(i).DrawSpriteOnScreen(spriteBatch); } // End drawing . // Send all gathered details to the graphic card in one batch . spriteBatch.End(); base.Draw(gameTime); }
/// <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); //Start drawing. spriteBatch.Begin(); for (int i = 0; i < SpritesForDrawList.Count; i++) { SpritesForDrawList.GetElement(i).Draw(spriteBatch); } // End drawing. // Send all gathered details to the graphic card in one batch. spriteBatch.End(); base.Draw(gameTime); }