Start implementing a menu system, fix game save/load.
This commit is contained in:
parent
109283a383
commit
ea8b0360bc
4 changed files with 35 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue