- room beautifying finished

- scenes
- starters
This commit is contained in:
2022-10-25 19:07:21 +02:00
parent fbda875ac6
commit 838cd171ae
9 changed files with 260 additions and 102 deletions

23
starter.lua Normal file
View File

@@ -0,0 +1,23 @@
starter={}
function starter.new(_hab,_x,_y,_scene)
return {hab=_hab,x=_x,y=_y,scene=_scene,update=starter.update,draw=starter.draw,bb={x=0,y=0,w=8,h=8}}
end
function starter:draw()
-- do nothing
--rectfill(self.x,self.y,self.x+8,self.y+8,3)
end
function starter:update()
if self.hab==abad.hab then
if aabb(abad,self) then
starter.do_touched(self)
end
end
end
function starter:do_touched()
start_scene(self.scene)
remove_actor(self)
end