[WIP] Lluita contra jefes. El cacaus ja li impacten

This commit is contained in:
2026-04-06 02:15:19 +02:00
parent 6ac7a811d9
commit a481d3798b
4 changed files with 12 additions and 4 deletions

View File

@@ -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