Commit 04bb68966acdd18ade0638c51c037ce1156b6b8d
1 parent
11dc342c
Échap
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
game/main.lua
@@ -117,6 +117,9 @@ function love.draw() | @@ -117,6 +117,9 @@ function love.draw() | ||
117 | end | 117 | end |
118 | 118 | ||
119 | function love.keypressed(key, unicode) | 119 | function love.keypressed(key, unicode) |
120 | + if key == 'escape' then | ||
121 | + love.event.quit() | ||
122 | + end | ||
120 | if _G[gamestate .. "_keypressed"] then | 123 | if _G[gamestate .. "_keypressed"] then |
121 | _G[gamestate .. "_keypressed"](key, unicode) | 124 | _G[gamestate .. "_keypressed"](key, unicode) |
122 | end | 125 | end |