Skip to content

Commit

Permalink
fix: unpause game when going back to menu
Browse files Browse the repository at this point in the history
  • Loading branch information
myin142 committed May 21, 2023
1 parent 3ca2d89 commit 7603cea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions addons/debug/Debug.gd
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ func _ready():
_logging_cmd()


func _unhandled_input(event):
if event.is_action_pressed("dev"):
visible = !visible
if visible:
input.grab_focus()
#func _unhandled_input(event):
# if event.is_action_pressed("dev"):
# visible = !visible
# if visible:
# input.grab_focus()


func print_line(str: String):
Expand Down
2 changes: 2 additions & 0 deletions src/menu/Pause.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ func _ready():
clear_menu()
back_button.visible = start_scene != null

func _exit_tree():
get_tree().paused = false

func _handle_event(event: InputEvent):
if event.is_action_pressed("ui_cancel"):
Expand Down

0 comments on commit 7603cea

Please sign in to comment.