You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
391 B
21 lines
391 B
function GameKeyPressed(key)
|
|
if key == "escape" then
|
|
musicBattle:setVolume(0)
|
|
musicPause:setVolume(0.6)
|
|
|
|
_G.GAMESTATE = "PAUSE"
|
|
print("STATE CHANEGD: PAUSED!")
|
|
_G.PAUSED = true
|
|
end
|
|
|
|
if key == "b" and not _G.PAUSED then
|
|
DebugFlag = not DebugFlag
|
|
end
|
|
|
|
--TODO: Better restart
|
|
if key == "r" and not _G.PAUSED then
|
|
RestartGame()
|
|
_G.GAMESTATE = "GAME"
|
|
love.load()
|
|
end
|
|
end
|
|
|