- WIP: Treballant en el menu del joc i els objectes

This commit is contained in:
2023-01-31 20:05:08 +01:00
parent d77a9bd21b
commit e8a9163c65
5 changed files with 15 additions and 3 deletions

View File

@@ -32,6 +32,14 @@ game={
fade.fadein()
end,
show_menu=function()
menu.show({ {"GUARDAR PARTIDA", editor.new},
{"CARREGAR PARTIDA", function() textbox.show("FILENAME TO LOAD:",editor.load, mapa.name) end},
{"EIXIR", function() if mapa.name~=nil then editor.save(mapa.name) else textbox.show("FILENAME TO SAVE:",editor.save, mapa.name) end end},
{"EXIT", main_init},
}, function()editor.paused=false end)
end,
update=function()
local hero = actors.search("jailer")
if hero then
@@ -56,6 +64,8 @@ game={
hero.path={pos=0,route='l',keys=true}
elseif btn(KEY_RIGHT) then
hero.path={pos=0,route='r',keys=true}
elseif btnp(KEY_ESCAPE) then
game.show_menu()
end
end