small changes

This commit is contained in:
2025-06-16 01:12:48 +02:00
parent fb74a1cd10
commit 2515716591
13 changed files with 86 additions and 87 deletions
+22 -3
View File
@@ -1,5 +1,6 @@
extends Control
var balloon: Node
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -7,6 +8,24 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func start_balloon(dialogue_resource: Resource, start_title: String):
#Freeing Previous Balloon and Disconnecting DialogueManager signals
clean_balloon()
#Instantiating a custom balloon
var balloon_path = "res://Dialogues/balloon_big.tscn"
var Balloon: Resource = load(balloon_path)
balloon = Balloon.instantiate()
get_tree().current_scene.add_child(balloon)
#Starting dialogue
balloon.start(dialogue_resource, start_title)
func clean_balloon():
#Freeing Previous Balloon
if is_instance_valid(balloon):
balloon.queue_free()