- 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

View File

@@ -7,6 +7,14 @@ seltile = 0
actors={}
function remove_actor(actor)
for index, value in pairs(actors) do
if value == actor then
table.remove(actors,index)
end
end
end
function _init()
tiles=loadsurf("tiles.gif")
setsource(tiles)
@@ -22,6 +30,8 @@ function _init()
table.insert(actors,z)
c=caco.new(11,24,16)
table.insert(actors,c)
table.insert(actors,starter.new(10,44,32,scenes.abad_inici))
score.create()
_update=update_game
@@ -72,6 +82,7 @@ function update_dialog()
_update=update_game
end
end
scroll=0
function update_game()
cls(16)
@@ -147,8 +158,10 @@ function update_game()
actor:update()
if actor.hab==cacau.hab and actor~=abad then
if aabb(actor,cacau) then
actor:hit()
cacau.hab=-1
if actor.hit~=nil then
actor:hit()
cacau.hab=-1
end
end
end
end