TinyAdventure/objects/actionable.gd

11 lines
408 B
GDScript

extends Area3D
@export var dialogue_resource: DialogueResource
@export var dialogue_start: String = "start"
func action(quest_state: QuestState) -> void:
var balloon = load("res://ui/dialogue/balloon.tscn").instantiate()
DialogueManager.connect("dialogue_ended", quest_state.on_dialogue_ended)
get_tree().current_scene.add_child(balloon)
balloon.start(dialogue_resource, dialogue_start, [quest_state])