main
Simon Kellet 3 months ago
parent d059017989
commit 2d22a50447
  1. 22
      Pause/PauseKeyPressed.lua

@ -1,20 +1,30 @@
function PauseKeyPressed(key)
if key == "return" then
-- quickly return to the game
musicBattle:setVolume(0.5)
musicPause:setVolume(0)
if not MUTED then
musicBattle:setVolume(0.5)
musicPause:setVolume(0)
else
musicBattle:setVolume(0)
musicPause:setVolume(0)
end
-- 0 Return to game
-- 1 Quit
if PAUSE_POS == 0 then
-- unpause the game
_G.GAMESTATE = "GAME"
print("STATE CHANEGD: GAME!")
--print("STATE CHANEGD: GAME!")
_G.PAUSED = false
musicBattle:setVolume(0.5)
musicPause:setVolume(0)
if not MUTED then
musicBattle:setVolume(0.5)
musicPause:setVolume(0)
else
musicBattle:setVolume(0)
musicPause:setVolume(0)
end
elseif PAUSE_POS == 1 then
_G.GAMESTATE = "MENU"
print("STATE CHANEGD: MENU!")
--print("STATE CHANEGD: MENU!")
_G.PAUSED = false
musicPause:stop()
musicBattle:stop()

Loading…
Cancel
Save