TinyAdventure/objects/actionable.gd

11 lines
408 B
GDScript
Raw Normal View History

extends Area3D
@export var dialogue_resource: DialogueResource
@export var dialogue_start: String = "start"
2024-07-15 22:20:49 +02:00
func action(quest_state: QuestState) -> void:
2024-07-12 14:32:33 +02:00
var balloon = load("res://ui/dialogue/balloon.tscn").instantiate()
2024-07-15 22:20:49 +02:00
DialogueManager.connect("dialogue_ended", quest_state.on_dialogue_ended)
2024-07-12 14:32:33 +02:00
get_tree().current_scene.add_child(balloon)
2024-07-15 22:20:49 +02:00
balloon.start(dialogue_resource, dialogue_start, [quest_state])