|
|
@ -14,8 +14,21 @@ namespace SemiColinGames { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
struct DebugLine { |
|
|
|
public Point start; |
|
|
|
public Point end; |
|
|
|
public Color color; |
|
|
|
|
|
|
|
public DebugLine(Point start, Point end, Color color) { |
|
|
|
this.start = start; |
|
|
|
this.end = end; |
|
|
|
this.color = color; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static bool Enabled; |
|
|
|
static List<DebugRect> rects = new List<DebugRect>(); |
|
|
|
static List<DebugLine> lines = new List<DebugLine>(); |
|
|
|
static Texture2D whiteTexture; |
|
|
|
static string toast = null; |
|
|
|
|
|
|
@ -38,12 +51,17 @@ namespace SemiColinGames { |
|
|
|
|
|
|
|
public static void Clear() { |
|
|
|
rects.Clear(); |
|
|
|
lines.Clear(); |
|
|
|
} |
|
|
|
|
|
|
|
public static void AddRect(Rectangle rect, Color color) { |
|
|
|
rects.Add(new DebugRect(rect, color)); |
|
|
|
} |
|
|
|
|
|
|
|
public static void AddLine(Point start, Point end, Color color) { |
|
|
|
lines.Add(new DebugLine(start, end, color)); |
|
|
|
} |
|
|
|
|
|
|
|
public static void DrawToast(SpriteBatch spriteBatch, SpriteFont font) { |
|
|
|
if (toast == null) { |
|
|
|
return; |
|
|
|