Text Settings done
This commit is contained in:
+8
-36
@@ -18,11 +18,14 @@ extends Control
|
||||
|
||||
signal recovery_pressed
|
||||
|
||||
|
||||
var main: Node
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
||||
#Referencing main node
|
||||
main = get_parent()
|
||||
|
||||
#Connecting signals
|
||||
alone_controls.get_node("PatientFile").pressed.connect(self._on_patient_file_pressed)
|
||||
alone_controls.get_node("Guidebook").pressed.connect(self._on_guidebook_pressed)
|
||||
@@ -125,7 +128,7 @@ func _on_call_next_patient_pressed():
|
||||
await TransitionScreen.transition_finished
|
||||
|
||||
#Starting Dialogue
|
||||
start_balloon(patient_dialogue_resource, "start")
|
||||
main.start_balloon("small", patient_dialogue_resource, "start")
|
||||
|
||||
|
||||
|
||||
@@ -203,24 +206,6 @@ func _on_psych_ward_pressed():
|
||||
|
||||
|
||||
|
||||
#Starting dialogue
|
||||
func start_balloon(dialogue_resource: Resource, start_title: String):
|
||||
|
||||
#Freeing Previous Balloon and Disconnecting DialogueManager signals
|
||||
clean_balloon()
|
||||
|
||||
#Instantiating a custom balloon
|
||||
var Balloon: Resource = load("res://Dialogues/balloon_small.tscn")
|
||||
balloon = Balloon.instantiate()
|
||||
get_tree().current_scene.add_child(balloon)
|
||||
|
||||
#Starting Dialogue and connecting DialogueManager signals
|
||||
DialogueManager.got_dialogue.connect(_change_emotion)
|
||||
DialogueManager.got_dialogue.connect(_recording_text)
|
||||
balloon.start(dialogue_resource, start_title)
|
||||
|
||||
|
||||
|
||||
#Clears patient and transitions towards next patient or end of day
|
||||
func clear_patient(choice:String):
|
||||
|
||||
@@ -229,7 +214,7 @@ func clear_patient(choice:String):
|
||||
_on_examine_pressed()
|
||||
|
||||
#Final Patient Dialogue
|
||||
start_balloon(patient_dialogue_resource, choice)
|
||||
main.start_balloon("small", patient_dialogue_resource, choice)
|
||||
await DialogueManager.dialogue_ended
|
||||
|
||||
#Transitioning
|
||||
@@ -254,24 +239,11 @@ func clear_patient(choice:String):
|
||||
|
||||
#Starting End of Day Dialogue
|
||||
var start_title = "end_of_day_" + str(Globals.day_count)
|
||||
start_balloon(end_of_day_dialogue_resource, start_title)
|
||||
main.start_balloon("small", end_of_day_dialogue_resource, start_title)
|
||||
|
||||
|
||||
|
||||
func _on_recovery_pressed():
|
||||
|
||||
clean_balloon()
|
||||
main.clear_balloon()
|
||||
recovery_pressed.emit()
|
||||
|
||||
|
||||
|
||||
#Cleaning balloon
|
||||
func clean_balloon():
|
||||
|
||||
#Freeing Previous Balloon and Disconnecting DialogueManager signals
|
||||
if is_instance_valid(balloon):
|
||||
balloon.queue_free()
|
||||
if DialogueManager.is_connected("got_dialogue", _change_emotion):
|
||||
DialogueManager.disconnect("got_dialogue", _change_emotion)
|
||||
if DialogueManager.is_connected("got_dialogue", _recording_text):
|
||||
DialogueManager.disconnect("got_dialogue", _recording_text)
|
||||
|
||||
Reference in New Issue
Block a user