added pause and music
This commit is contained in:
+11
-4
@@ -1,14 +1,21 @@
|
||||
function GameKeyPressed(key)
|
||||
|
||||
if key == "escape" then
|
||||
_G.GAMESTATE = "MENU"
|
||||
print("STATE CHANEGD: MENU!")
|
||||
musicBattle:setVolume(0)
|
||||
musicPause:setVolume(0.5)
|
||||
|
||||
_G.GAMESTATE = "PAUSE"
|
||||
print("STATE CHANEGD: PAUSED!")
|
||||
_G.PAUSED = true
|
||||
end
|
||||
|
||||
if key == "b" then
|
||||
if key == "b" and not _G.PAUSED then
|
||||
DebugFlag = not DebugFlag
|
||||
end
|
||||
|
||||
if key == "r" then
|
||||
--[[
|
||||
if key == "r" and not _G.PAUSED then
|
||||
love.load()
|
||||
end
|
||||
]]--
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user