/// <summary> /// Render the player sprite. Should be invoked between /// SpriteBatch.Begin() and SpriteBatch.End() /// </summary> /// <param name="spriteBatch">The SpriteBatch to use</param> public void Draw(SpriteBatch spriteBatch) { #if VISUAL_DEBUG VisualDebugging.DrawRectangle(spriteBatch, Bounds, Color.Red); #endif frames[currentFrame].Draw(spriteBatch, Position, color, 0, origin, 2, spriteEffects, 1); }
/// <summary> /// Render the player sprite. Should be invoked between /// SpriteBatch.Begin() and SpriteBatch.End() /// </summary> /// <param name="spriteBatch">The SpriteBatch to use</param> /// <param name="translationMatrix">Matrix used for translating the particles systems' Draw functions</param> public void Draw(SpriteBatch spriteBatch, Matrix translationMatrix) { #if VISUAL_DEBUG VisualDebugging.DrawRectangle(spriteBatch, Bounds, Color.Red); #endif frames[currentFrame].Draw(spriteBatch, Position, color, 0, origin, 2, spriteEffects, 1); coinParticles.Draw(translationMatrix); }
/// <summary> /// Draws the platform /// </summary> /// <param name="spriteBatch">The spriteBatch to render to</param> public void Draw(SpriteBatch spriteBatch) { #if VISUAL_DEBUG VisualDebugging.DrawRectangle(spriteBatch, bounds, Color.Green); #endif for (int i = 0; i < tileCount; i++) { sprite.Draw(spriteBatch, new Vector2(bounds.X + i * sprite.Width, bounds.Y), Color.Purple); } }
/// <summary> /// Draws the platform /// </summary> /// <param name="spriteBatch">The spriteBatch to render to</param> public void Draw(SpriteBatch spriteBatch) { #if VISUAL_DEBUG VisualDebugging.DrawRectangle(spriteBatch, bounds, Color.Green); #endif if (active) { sprite.Draw(spriteBatch, bounds, Color.White); } }