summaryrefslogtreecommitdiff
path: root/debug_arrow.lua
blob: ed79a9ac3a3985f60267a0dfc93830879b8eba82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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