From 4aaa0dbc8fa2bc1514287fdb396293884e1d3ea6 Mon Sep 17 00:00:00 2001 From: PossiblyAxolotl Date: Thu, 12 May 2022 22:34:12 -0600 Subject: [PATCH] added alt button --- Source/Menu.lua | 6 +++--- Source/Player.lua | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Menu.lua b/Source/Menu.lua index fee43c7..79324dd 100644 --- a/Source/Menu.lua +++ b/Source/Menu.lua @@ -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 diff --git a/Source/Player.lua b/Source/Player.lua index 79d0485..e0572ba 100644 --- a/Source/Player.lua +++ b/Source/Player.lua @@ -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()