added alt button

This commit is contained in:
PossiblyAxolotl 2022-05-12 22:34:12 -06:00
parent 2ea6b797e4
commit 4aaa0dbc8f
2 changed files with 5 additions and 5 deletions

View file

@ -25,7 +25,7 @@ function mainMenuCreation()
barposLerp = 160
logposLerp = -122
mainmenu = {}
mainmenu[4],mainmenu[3],mainmenu[2], mainmenu[1], mainmenu[0] = "START NEW GAME", "USER LEVELS", "LEVEL EDITOR", "ABOUT THE CREATOR", "mainNoPlay"
mainmenu[4],mainmenu[3],mainmenu[2], mainmenu[1], mainmenu[0] = "START NEW GAME", "USER LEVELS", "LEVEL EDITOR", "EXTRAS", "mainNoPlay"
if playdate.datastore.read("savegame") then
map = playdate.datastore.read("savegame").savedLevel
@ -162,9 +162,9 @@ function menuButtonPress(name)
addMap(map)
mode = "game"
elseif name == "ABOUT THE CREATOR" then
elseif name == "EXTRAS" then
local m = {}
m[0],m[1] = "about", "BACK"
m[0],m[1] = "extras", "BACK"
createMenu(m)
elseif name == "USER LEVELS" then

View file

@ -61,7 +61,7 @@ end
function updatePlayer()
if active == true then
if playdate.buttonIsPressed(playdate.kButtonUp) then
if playdate.buttonIsPressed(playdate.kButtonUp) or playdate.buttonIsPressed(playdate.kButtonA) then
velocity.x = velocity.x + math.sin(math.rad(playdate.getCrankPosition())) /2
velocity.y = velocity.y - math.cos(math.rad(playdate.getCrankPosition())) /2
end
@ -81,7 +81,7 @@ function updatePlayer()
end
elseif exists == true then
if playdate.buttonIsPressed(playdate.kButtonUp) then
if playdate.buttonIsPressed(playdate.kButtonUp) or playdate.buttonIsPressed(playdate.kButtonA) then
active = true
end
local cx, cy = gfx.getDrawOffset()