[WIP] Lluita contra jefes. El cacaus ja li impacten
This commit is contained in:
@@ -175,7 +175,10 @@ function world_update()
|
||||
-- Comprovar dispars contra "monstres"
|
||||
if viewp:inside(actor.x, actor.y, actor.w, actor.h) and actor~=abad then
|
||||
for _, cacau_shot in pairs(cacau.shots()) do
|
||||
if cacau_shot.alive and collision(actor,cacau_shot) then
|
||||
-- if collision(actor,cacau_shot) then print("COLLISION") end
|
||||
-- if actor.enabled then print(actor.name) else print("NOT "..actor.name) end
|
||||
-- if cacau_shot.alive then print("CACAU") end
|
||||
if actor.enabled and cacau_shot.alive and collision(actor,cacau_shot) then
|
||||
if actor.hit ~= nil and not actor.dying then
|
||||
actor:hit()
|
||||
if actor.can_warp then warp.open(actor) end
|
||||
|
||||
Reference in New Issue
Block a user