Files
pomchronicles/speech_bubble.gd

15 lines
393 B
GDScript

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