public void Draw(SpriteBatch spriteBatch, SpriteEffects flipEffects, Vector2 position, float rotation, float scale, Color color, Vector2 Offset, IAnimationEffect animationEffect) { var texture = Texture; var origin = new Vector2(texture.Width / 2, texture.Height / 2); var actualX = flipEffects == SpriteEffects.FlipHorizontally ? position.X - Offset.X : position.X + Offset.X; var actualY = flipEffects == SpriteEffects.FlipVertically ? position.Y - Offset.Y : position.Y + Offset.Y; // TODO: Test this, no vertical flip yet var actualPosition = new Vector2(actualX, actualY); animationEffect.Draw(spriteBatch, texture, actualPosition, new Rectangle(0, 0, texture.Width, texture.Height), color, rotation, origin, scale, flipEffects, 1.0f); }
public void Draw(SpriteBatch spriteBatch, SpriteEffects flipEffects, Vector2 position, float rotation, float scale, Color color, IAnimationEffect animationEffect) { animationEffect.Draw(spriteBatch, spriteSheet, position, definition.SrcRectangle, color, rotation, definition.Origin, scale, flipEffects, 1.0f); }