15 lines
408 B
Lua
15 lines
408 B
Lua
|
|
function ia.update_brick(spr)
|
|
if spr.timeout > 0 then
|
|
spr.timeout = spr.timeout - 1
|
|
if spr.timeout == 0 then
|
|
local tx, ty = spr.pos.x>>3, spr.pos.y>>3
|
|
map.tile(tx,ty,0)
|
|
end
|
|
else
|
|
spr.pos.y = spr.pos.y + 2
|
|
local tx, ty = (spr.pos.x+2)>>3, (spr.pos.y)>>3
|
|
if rooms.is_outside(tx,ty) then sprites.remove(spr) return end
|
|
end
|
|
end
|