extends CanvasLayer

var paused = false


func _input(_event):
	if Input.is_action_just_pressed("pause") and !get_parent().get_node("DeathMenu/Control").visible:
		if !paused:
			get_tree().paused = true
			paused = true
		else:
			get_tree().paused = false
			paused = false
			

func _process(_delta):
	visibility(paused)

		
func visibility(visible):
	$Control.visible = visible
