Escape leaves game/exits
This commit is contained in:
parent
3d2ddcbd62
commit
a4b6e7450f
2 changed files with 4 additions and 0 deletions
|
@ -171,6 +171,8 @@ function level_state:keypressed(key, unicode)
|
||||||
or love.keyboard.isDown("rctrl")) then
|
or love.keyboard.isDown("rctrl")) then
|
||||||
|
|
||||||
current_level.reset = true
|
current_level.reset = true
|
||||||
|
elseif key == "escape" then
|
||||||
|
Gamestate.switch(menu_state)
|
||||||
elseif key == "d"
|
elseif key == "d"
|
||||||
and (love.keyboard.isDown("lctrl")
|
and (love.keyboard.isDown("lctrl")
|
||||||
or love.keyboard.isDown("rctrl")) then
|
or love.keyboard.isDown("rctrl")) then
|
||||||
|
|
|
@ -62,6 +62,8 @@ function menu_state:keypressed(key, unicode)
|
||||||
elseif key == "c" then
|
elseif key == "c" then
|
||||||
level_state.mode = "computer"
|
level_state.mode = "computer"
|
||||||
Gamestate.switch(level_state)
|
Gamestate.switch(level_state)
|
||||||
|
elseif key == "escape" then
|
||||||
|
love.event.quit()
|
||||||
else
|
else
|
||||||
level_state.computer = "2player"
|
level_state.computer = "2player"
|
||||||
Gamestate.switch(level_state)
|
Gamestate.switch(level_state)
|
||||||
|
|
Loading…
Reference in a new issue