love2d-tank/Game/GameKeyPressed.lua
Simon Kellet 53aa6d698d changes
2024-07-21 13:47:33 +01:00

26 lines
426 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
--TODO: Move player movement code into here!
--[[
-- TODO: Better restart
if key == "r" and not _G.PAUSED then
love.load()
end
]]--
end