protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.MidnightBlue); spriteBatch.Begin(SpriteSortMode.FrontToBack, transformMatrix: camera.Transform); player.Draw(spriteBatch); foreach (var sb in _scrollingBackgrounds) { sb.Draw(spriteBatch); } level.DrawWorld(spriteBatch); level.UpdateWorld(gameTime); gui.Draw(spriteBatch); spriteBatch.End(); menu.Draw(gameTime, spriteBatch); if (level.Snow) { spriteBatch.Begin(); _snowEmitter.Draw(gameTime, spriteBatch); 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.MidnightBlue); spriteBatch.Begin(); _snowEmitter.Draw(gameTime, spriteBatch); spriteBatch.End(); base.Draw(gameTime); }