extends Node2D
signal blur_changed(amount: float)
@export var blur: float = 0.0
@onready var animplayer:AnimationPlayer = $SubViewport/Fade/AnimationPlayer
# Called when the node enters the scene tree for the first time.
func _ready():
	$CanvasLayer.hide()
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	pass

func say(line):
	if !$CanvasLayer.visible:
		animplayer.play("fade_in")
		await get_tree().process_frame
		$CanvasLayer.show()
		
		await animplayer.animation_finished
	$"SubViewport/talk-label".text = line

func done_say():
	$"SubViewport/talk-label".text = ""
	animplayer.play_backwards("fade_in")
	await animplayer.animation_finished
	$CanvasLayer.hide()
