- WIP: Treballant en el menu del joc i els objectes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user