public static void DrawLine(Vec2Int p1, Vec2Int p2, Color color, DebugInterface debugInterface) { var vertex1 = new ColoredVertex(new Vec2Float(p1.X + 0.5f, p1.Y + 0.5f), new Vec2Float(0, 0), color); var vertex2 = new ColoredVertex(new Vec2Float(p2.X + 0.5f, p2.Y + 0.5f), new Vec2Float(0, 0), color); var debugData = new DebugData.Primitives(new[] { vertex1, vertex2 }, PrimitiveType.Lines); var debugCommand = new DebugCommand.Add(debugData); debugInterface.Send(debugCommand); }
public static void DrawRegion(int x, int y, Color color, DebugInterface debugInterface) { var vertex1 = new ColoredVertex(new Vec2Float(x + 0.25f, y + 0.25f), new Vec2Float(0, 0), color); var vertex2 = new ColoredVertex(new Vec2Float(x + 0.75f, y + 0.25f), new Vec2Float(0, 0), color); var vertex3 = new ColoredVertex(new Vec2Float(x + 0.75f, y + 0.75f), new Vec2Float(0, 0), color); var vertex4 = new ColoredVertex(new Vec2Float(x + 0.25f, y + 0.75f), new Vec2Float(0, 0), color); var debugData = new DebugData.Primitives(new[] { vertex1, vertex2, vertex3, vertex4 }, PrimitiveType.Lines); var debugCommand = new DebugCommand.Add(debugData); debugInterface.Send(debugCommand); }