add Debug.AddPoint()

This commit is contained in:
Colin McMillen 2020-03-11 12:44:14 -04:00
parent c08defc656
commit 4c2437e1ac

View File

@ -90,6 +90,12 @@ namespace SemiColinGames {
AddRect(rect, color); AddRect(rect, color);
} }
[System.Diagnostics.Conditional("DEBUG")]
public static void AddPoint(Point p, Color color) {
AddLine(p.X, p.Y - 2, p.X, p.Y + 1, color);
AddLine(p.X - 2, p.Y, p.X + 1, p.Y, color);
}
[System.Diagnostics.Conditional("DEBUG")] [System.Diagnostics.Conditional("DEBUG")]
public static void AddLine(Point start, Point end, Color color) { public static void AddLine(Point start, Point end, Color color) {
if (lineIdx >= MAX_LINE_VERTICES) { if (lineIdx >= MAX_LINE_VERTICES) {