-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds additional options to dialog manager, including a left-cli…
…ck action option and a text skipping option
- Loading branch information
Showing
9 changed files
with
139 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
addons/escoria-core/game/scenes/dialogs/state_machine/dialog_say_finish.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
extends State | ||
class_name DialogSayFinish | ||
|
||
|
||
# Reference to the currently playing dialog manager | ||
var _dialog_manager: ESCDialogManager = null | ||
|
||
|
||
func initialize(dialog_manager: ESCDialogManager) -> void: | ||
_dialog_manager = dialog_manager | ||
|
||
|
||
func enter(): | ||
escoria.logger.trace(self, "Dialog State Machine: Entered 'say_finish'.") | ||
|
||
if escoria.inputs_manager.input_mode != \ | ||
escoria.inputs_manager.INPUT_NONE and \ | ||
_dialog_manager != null: | ||
|
||
if not _dialog_manager.is_connected("say_visible", self, "_on_say_visible"): | ||
_dialog_manager.connect("say_visible", self, "_on_say_visible", [], CONNECT_ONESHOT) | ||
|
||
_dialog_manager.finish() | ||
else: | ||
escoria.logger.error(self, "Illegal state.") | ||
|
||
|
||
func _on_say_visible() -> void: | ||
escoria.logger.trace(self, "Dialog State Machine: 'say_finish' -> 'visible'") | ||
emit_signal("finished", "visible") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters