- room beautifying finished
- scenes - starters
This commit is contained in:
23
starter.lua
Normal file
23
starter.lua
Normal 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
|
||||
Reference in New Issue
Block a user