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 barposLerp = 160
logposLerp = -122 logposLerp = -122
mainmenu = {} 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 if playdate.datastore.read("savegame") then
map = playdate.datastore.read("savegame").savedLevel map = playdate.datastore.read("savegame").savedLevel
@ -162,9 +162,9 @@ function menuButtonPress(name)
addMap(map) addMap(map)
mode = "game" mode = "game"
elseif name == "ABOUT THE CREATOR" then elseif name == "EXTRAS" then
local m = {} local m = {}
m[0],m[1] = "about", "BACK" m[0],m[1] = "extras", "BACK"
createMenu(m) createMenu(m)
elseif name == "USER LEVELS" then elseif name == "USER LEVELS" then

View file

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