Moguda la comprovació de pintar fora de la funció draw de cada actor

This commit is contained in:
2026-03-29 17:02:05 +02:00
parent 2c93003fe2
commit 7f4f29ecc2
12 changed files with 44 additions and 53 deletions

View File

@@ -210,8 +210,7 @@ function update_game()
render_map(sf_mapa, tiles, vp_x, vp_y)
for key,actor in pairs(actors) do
-- if actor.hab==hab then
if true then
if viewp:inside(actor.x, actor.y, actor.w, actor.h) then
actor:draw()
end
end