extends TextureRect

var timer: SceneTreeTimer

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	global.fade_in()
	timer = get_tree().create_timer(5)
	await timer.timeout
	var scene = load("res://menus/main_menu.tscn")
	global.goto_scene(scene)


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
	if Input.is_action_just_pressed("ui_accept") || Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
		timer.emit_signal("timeout")
