feat: allows for the skipping of dialogue after the text is fully visible; still need to look at integrating with user options

This commit is contained in:
Duncan Brown
2022-11-14 22:43:40 -05:00
committed by Julian Murgia
parent 886f402395
commit bd2f28214b
15 changed files with 615 additions and 169 deletions

View File

@@ -41,6 +41,7 @@ func has_chooser_type(type: String) -> bool:
# - type: Type of dialog box to use
func say(dialog_player: Node, global_id: String, text: String, type: String):
_dialog_player = dialog_player
if type == "floating":
_type_player = preload(\
"res://addons/escoria-dialog-simple/types/floating.tscn"\
@@ -51,6 +52,7 @@ func say(dialog_player: Node, global_id: String, text: String, type: String):
).instance()
_type_player.connect("say_finished", self, "_on_say_finished", [], CONNECT_ONESHOT)
_type_player.connect("say_visible", self, "_on_say_visible", [], CONNECT_ONESHOT)
_dialog_player.add_child(_type_player)
_type_player.say(global_id, text)
@@ -66,6 +68,10 @@ func _on_say_finished():
emit_signal("say_finished")
func _on_say_visible():
emit_signal("say_visible")
# Present an option chooser to the player and sends the signal
# `option_chosen` with the chosen dialog option
#