love2d-tank/Game/GameKeyPressed.lua
2024-07-20 10:25:45 +01:00

22 lines
352 B
Lua

function GameKeyPressed(key)
if key == "escape" then
musicBattle:setVolume(0)
musicPause:setVolume(0.5)
_G.GAMESTATE = "PAUSE"
print("STATE CHANEGD: PAUSED!")
_G.PAUSED = true
end
if key == "b" and not _G.PAUSED then
DebugFlag = not DebugFlag
end
--[[
if key == "r" and not _G.PAUSED then
love.load()
end
]]--
end