[WIP] Treballant en el jefe. Recuperar informació de l'entorn

This commit is contained in:
2026-04-09 23:12:17 +02:00
parent 0a682b2440
commit 87e2a134a8
3 changed files with 158 additions and 47 deletions

View File

@@ -9,10 +9,10 @@ function point.new(_hab,_x,_y,_x_offset,_y_offset,_id)
hab=_hab,
x=world_x+_x_offset,
y=world_y+_y_offset,
w=8,
h=8,
w=16,
h=16,
draw=point.draw,
bb={x=0,y=0,w=1,h=1},
bb={x=4,y=0,w=8,h=16},
}
end
@@ -21,8 +21,10 @@ function point:draw(fill)
-- debug rect
if not fill then
draw.rect(scr_x,scr_y,self.w,self.h,3)
draw.rect(scr_x+self.bb.x,scr_y,self.bb.w,self.h,2)
else
draw.rectf(scr_x,scr_y,self.w,self.h,3)
draw.rectf(scr_x+self.bb.x,scr_y,self.bb.w,self.h,2)
end
end