diff --git a/Shared/Debug.cs b/Shared/Debug.cs index 9927bc3..0155ca9 100644 --- a/Shared/Debug.cs +++ b/Shared/Debug.cs @@ -83,6 +83,10 @@ namespace SemiColinGames { lines.Add(new DebugLine(new Point(p1x, p1y), new Point(p2x, p2y), color)); } + public static void AddLine(Vector2 start, Vector2 end, Color color) { + lines.Add(new DebugLine(start.ToPoint(), end.ToPoint(), color)); + } + public static void DrawToasts(SpriteBatch spriteBatch, SpriteFont font) { if (!Enabled) { return; @@ -119,7 +123,7 @@ namespace SemiColinGames { Point[] points = Line.Rasterize(line.Start, line.End); foreach (var point in points) { spriteBatch.Draw( - whiteTexture, new Rectangle(point.X, point.Y, 1, 1), line.Color); + whiteTexture, new Rectangle(point.X - camera.Left, point.Y, 1, 1), line.Color); } } }