TinyAdventure/objects/actionable.gd

12 lines
394 B
GDScript

extends Area3D
@export var dialogue_resource: DialogueResource
@export var dialogue_start: String = "start"
func action() -> void:
var balloon = load("res://ui/dialogue/balloon.tscn").instantiate() as DialogueBaloon
get_tree().current_scene.add_child(balloon)
var quest_states = get_tree().get_nodes_in_group("quest_state")
balloon.start(dialogue_resource, dialogue_start, quest_states)