diff options
author | rom <romangraef@gmail.com> | 2021-04-26 23:56:42 +0200 |
---|---|---|
committer | rom <romangraef@gmail.com> | 2021-04-26 23:56:56 +0200 |
commit | a7b42bd030efaaa70769cda2e368a42b7ead4942 (patch) | |
tree | d7fe8e31c3827bcbb89a85289ee3983d60d76f95 /scenes/pause.gd | |
parent | 6b07fc93cea108bcbcce1cbab7c70721f2dcb85a (diff) | |
download | ldjam48-a7b42bd030efaaa70769cda2e368a42b7ead4942.tar.gz ldjam48-a7b42bd030efaaa70769cda2e368a42b7ead4942.tar.bz2 ldjam48-a7b42bd030efaaa70769cda2e368a42b7ead4942.zip |
pause & puzzle solver
Diffstat (limited to 'scenes/pause.gd')
-rw-r--r-- | scenes/pause.gd | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scenes/pause.gd b/scenes/pause.gd index 0115b1a..9820845 100644 --- a/scenes/pause.gd +++ b/scenes/pause.gd @@ -14,6 +14,12 @@ func _on_Resume_on_click(): get_tree().paused = false emit_signal("unpause") +func _unhandled_input(event): + if event is InputEventKey and event.pressed and event.scancode == KEY_ESCAPE: + if pause_menu.visible: + _on_Resume_on_click() + else: + pause() func _on_Main_Menu_on_click(): get_tree().paused = false |