extends Node2D

@onready var middle_bubble = $Bubble
var player

func _ready() -> void:
	$AnimationPlayer.play('fade_in')
	player = get_tree().get_first_node_in_group("Player")
	middle_bubble.visible = false
	middle_bubble.get_node("Area2D/CollisionShape2D").disabled = true
	player.cutscene = false
	
	
func _on_ui_cutscene() -> void:
	print('here')
	middle_bubble.visible = true
	middle_bubble.get_node("Area2D/CollisionShape2D").disabled = false
	

func _on_player_iteract_cutscene() -> void:
	$AnimationPlayer.play('Final')


func _on_animation_player_animation_finished(anim_name: StringName) -> void:
	if anim_name == 'Final':
		get_tree().change_scene_to_file("res://scenes/menus/main_menu.tscn")
