diff --git a/Shared/Debug.cs b/Shared/Debug.cs index b89c672..7fce50b 100644 --- a/Shared/Debug.cs +++ b/Shared/Debug.cs @@ -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 rects = new List(); + static List lines = new List(); 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; diff --git a/Shared/SneakGame.cs b/Shared/SneakGame.cs index 646b85b..325432d 100644 --- a/Shared/SneakGame.cs +++ b/Shared/SneakGame.cs @@ -114,7 +114,7 @@ namespace SemiColinGames { // Draw foreground tiles. world.Draw(spriteBatch, camera); - // Draw debug rects. + // Draw debug rects & lines. Debug.Draw(spriteBatch, camera); // Aaaaand we're done.