extends Node

signal game_pause_toggled(paused: bool)

var can_pause = true

func _unhandled_input(event):
	if event.is_action_pressed("pause") and can_pause:
		game_pause_toggled.emit(true)
		get_tree().paused = true


func _on_game_unpause_queued():
	get_tree().paused = false
	game_pause_toggled.emit(false)
