[WIP] Triggers
- Algo de neteja de codi
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user