[WIP] Lluita contra jefes.

+ Redisseny de mapa
+ Ajustada la vista abans del combat i fixada en la vertical
[NEW] Objecte point
This commit is contained in:
2026-04-06 23:30:53 +02:00
parent a481d3798b
commit f93c9b6c55
7 changed files with 65 additions and 25 deletions

26
data/point.lua Normal file
View File

@@ -0,0 +1,26 @@
point={}
function point.new(_hab,_x,_y,_x_offset,_y_offset,_id)
local world_x, world_y = coords.room_to_world(_hab,_x,_y)
_x_offset = _x_offset or 0
_y_offset = _y_offset or 0
return {name="point",
id=_id,
hab=_hab,
x=world_x+_x_offset,
y=world_y+_y_offset,
w=8,
h=8,
draw=point.draw,
}
end
function point:draw()
local scr_x, scr_y = viewp:screen_coords( self.x, self.y )
-- debug rect
draw.rect(scr_x,scr_y,self.w,self.h,3)
end
function point:update()
-- do nothing
end