class_name SpeechBubble extends Sprite2D

@onready var anim_player : AnimationPlayer = $AnimationPlayer

func try_show_speech(type : String = ""):
	if type != "":
		if anim_player.has_animation(type):
			visible = true
			anim_player.play(type)
		else:
			printerr("Tried to show speech bubble %s but speech bubble does not have that type!" % type)
			visible = false
	else:
		visible = false
