extends Control

@onready var animation_player: AnimationPlayer = $AnimationPlayer


func _input(event: InputEvent) -> void:
	if (
		event is InputEventKey
		or event is InputEventMouseButton
		or event is InputEventJoypadButton
		or event is InputEventScreenTouch
	):
		get_viewport().set_input_as_handled()
		fade_out()


func fade_out() -> void:
	animation_player.play("fade_out")
