Browse Source

add Debug.AddRect(AABB) function

GitOrigin-RevId: 0acfc3f43f
master
Colin McMillen 4 years ago
parent
commit
4410ff137a
  1. 7
      Shared/Debug.cs

7
Shared/Debug.cs

@ -66,6 +66,13 @@ namespace SemiColinGames {
rects.Add(new DebugRect(rect, color));
}
public static void AddRect(Aabb box, Color color) {
Rectangle rect = new Rectangle(
(int) (box.Position.X - box.HalfSize.X), (int) (box.Position.Y - box.HalfSize.Y),
(int) (box.HalfSize.X * 2), (int) (box.HalfSize.Y * 2));
AddRect(rect, color);
}
public static void AddLine(Point start, Point end, Color color) {
lines.Add(new DebugLine(start, end, color));
}

Loading…
Cancel
Save