1 using Microsoft.Xna.Framework;
2 using Microsoft.Xna.Framework.Graphics;
11 public void Draw(SpriteBatch spriteBatch,
Hull hull,
float depth)
15 Vector2 drawPos = position + hull.
Rect.Location.ToVector2();
17 drawPos.Y = -drawPos.Y;
19 spriteBatch.Draw(
Sprite.
Texture, drawPos, clippedSourceRect, Color * GetAlpha(), 0, Vector2.Zero,
Scale, SpriteEffects.None, depth);
24 Point sectionSize = affectedSections.First().Rect.Size;
25 Rectangle drawPositionRect =
new Rectangle((
int)(drawOffset.X + hull.
Rect.X), (
int)(drawOffset.Y + hull.
Rect.Y), sectionSize.X, sectionSize.Y);
27 foreach (var section
in affectedSections)
30 GUI.DrawRectangle(spriteBatch,
new Vector2(drawPositionRect.X + section.Rect.X, -(drawPositionRect.Y + section.Rect.Y)),
new Vector2(sectionSize.X, sectionSize.Y), Color.Red,
false, 0.0f, (
int)Math.Max(1.5f /
Screen.
Selected.
Cam.
Zoom, 1.0f));
void Draw(SpriteBatch spriteBatch, Hull hull, float depth)