diff --git a/level_state.lua b/level_state.lua index dd936fe..884a88f 100644 --- a/level_state.lua +++ b/level_state.lua @@ -171,6 +171,8 @@ function level_state:keypressed(key, unicode) or love.keyboard.isDown("rctrl")) then current_level.reset = true + elseif key == "escape" then + Gamestate.switch(menu_state) elseif key == "d" and (love.keyboard.isDown("lctrl") or love.keyboard.isDown("rctrl")) then diff --git a/menu_state.lua b/menu_state.lua index 4b63521..5e6666b 100644 --- a/menu_state.lua +++ b/menu_state.lua @@ -62,6 +62,8 @@ function menu_state:keypressed(key, unicode) elseif key == "c" then level_state.mode = "computer" Gamestate.switch(level_state) + elseif key == "escape" then + love.event.quit() else level_state.computer = "2player" Gamestate.switch(level_state)