[WIP] Triggers

- Algo de neteja de codi
This commit is contained in:
2026-04-03 20:09:30 +02:00
parent de395abb06
commit 8b516a6a26
5 changed files with 33 additions and 57 deletions

View File

@@ -2,6 +2,21 @@ local shine_step = 1
local shine_wait = 0
local shine_pos = 0
function collision(a, b)
return (a.x+a.bb.x+a.bb.w >= b.x+b.bb.x)
and (a.x+a.bb.x <= b.x+b.bb.x+b.bb.w)
and (a.y+a.bb.y+a.bb.h >= b.y+b.bb.y)
and (a.y+a.bb.y <= b.y+b.bb.y+b.bb.h)
end
function remove_actor(actor)
for index, value in pairs(actors) do
if value == actor then
table.remove(actors,index)
end
end
end
function draw_shiny_rect(x, y, w, h, color, shine_color)
draw.rect(x,y,w,h,color)