- Reestructuració

This commit is contained in:
2023-01-13 19:16:34 +01:00
parent 22be7de746
commit b95650cee0
54 changed files with 45 additions and 0 deletions

27
data/invisibl.lua Normal file
View File

@@ -0,0 +1,27 @@
invisible={}
function invisible.new(_hab,_x,_y)
return {hab=_hab,x=_x,y=_y,wait=0,hit=invisible.hit,update=invisible.update,draw=invisible.draw,bb={x=0,y=0,w=8,h=8}}
end
function invisible:draw()
-- Es invisible, res que drawar
end
function invisible:update()
self.wait=self.wait+1
if self.wait==6 then
self.wait=0
if self.hab==abad.hab then
if aabb(abad,self) then
abad_hurt(1)
end
end
end
end
function invisible:hit()
end