Start implementing a menu system, fix game save/load.

This commit is contained in:
Anna Rose Wiggins 2019-12-11 18:43:11 -05:00
parent 109283a383
commit ea8b0360bc
4 changed files with 35 additions and 7 deletions

View file

@ -39,14 +39,18 @@ function init_player()
}
end
function handle_input()
-- NB: references menu_mode from main.lua
function player_input()
local new_x, new_y = player_x, player_y
if btnp"4" then
interact()
end
if btnp"5" then
menu_mode = true -- pass control to menu
end
if btnp"0" or btnp"1" or btnp"2" or btnp"3" then
if btnp"0" then
new_x -= 1 -- move left