internal virtual void Draw(SpriteBatch spriteBatch) { if (Sprite == null) { return; } SpriteExtensions.Draw( spriteBatch, Sprite, new Vector2( (int)Position.X - Sprite.Origin.X, (int)Position.Y - Sprite.Origin.Y ), Rotation, Vector2.One * Scale ); //spriteBatch.DrawCircle(Position + new Vector2(Size * Scale / 2f, Size * Scale / 2f), Size * Scale / 2f, 16, Color.Red, 1, 1); }
internal override void Draw(SpriteBatch spriteBatch) { if (Fired) { Fire.Depth = 0.9f; if (Flip) { Fire.Effect = SpriteEffects.None; } else { Fire.Effect = SpriteEffects.FlipHorizontally; } SpriteExtensions.Draw( spriteBatch, Fire, new Vector2( (int)Position.X - Fire.Origin.X, (int)Position.Y - Fire.Origin.Y + Size / 2 ) ); } for (int i = 0; i <= PartsMounted; i++) { Parts[i].Depth = 1f; SpriteExtensions.Draw( spriteBatch, Parts[i], new Vector2( (int)Position.X - Parts[i].Origin.X, (int)Position.Y - Parts[i].Origin.Y - (Size * i) ) ); } }