- [NEW] afegit dimoni
This commit is contained in:
@@ -9,7 +9,13 @@ function ia.update_bullet(spr)
|
||||
if v.enemy and v.state ~= templates.DEAD then
|
||||
local x2,y2,w2,h2 = util.aabb(v)
|
||||
if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then
|
||||
if v.state == templates.ALIVE then v.state = templates.DYING end
|
||||
if v.state == templates.ALIVE then
|
||||
if v.bulletproof then
|
||||
gota_esguita(spr)
|
||||
else
|
||||
v.state = templates.DYING
|
||||
end
|
||||
end
|
||||
sprites.remove(spr)
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user