summaryrefslogtreecommitdiff
path: root/debug_arrow.lua
diff options
context:
space:
mode:
Diffstat (limited to 'debug_arrow.lua')
-rw-r--r--debug_arrow.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/debug_arrow.lua b/debug_arrow.lua
new file mode 100644
index 0000000..ed79a9a
--- /dev/null
+++ b/debug_arrow.lua
@@ -0,0 +1,18 @@
+local M = {}
+M.queue = {}
+
+M.arrow = function(x1, y1, x2, y2, r, g, b)
+ table.insert(M.queue, {x1, y1, x2, y2, r, g, b})
+end
+
+M.draw = function()
+ for i, v in ipairs(M.queue) do
+ local x1, y1, x2, y2, r, g, b = unpack(v)
+ set_color(r,g,b)
+ line(x1, y1, x2, y2)
+ love.graphics.circle("fill", x2, y2, 1)
+ end
+ M.queue = {}
+end
+
+return M \ No newline at end of file