![]() |
EasyTalk API
|
The DialogueListener class defines various methods which are called as certain events occur during dialogue playback. It can be extended in order to easily create new functionality which responds to dialogue events. More...
Inherits MonoBehaviour.
Inherited by EasyTalk.Controller.DialogueController, EasyTalk.Display.AbstractDialogueDisplay, and EasyTalk.Display.DialoguePanel.
Public Member Functions | |
virtual void | OnContinue () |
Called whenever the dialogue continues on to the next line. | |
virtual void | OnDisplayOptions (List< DialogueOption > options) |
Called whenever dialogue options are to be presented. | |
virtual void | OnOptionChosen (DialogueOption option) |
Called whenever an option is chosen from the currently presented list of options. | |
virtual void | OnDisplayLine (ConversationLine conversationLine) |
Called when a line of dialogue is to be presented. | |
virtual void | OnDialogueEntered (string entryPointName) |
Called whenever a dialogue is entered (when playback begins). | |
virtual void | OnDialogueExited (string exitPointName) |
Called whenever a dialogue is exited (when playback ends). | |
virtual void | OnExitCompleted () |
Called at least one frame after a dialogue is exited. | |
virtual void | OnStory (string storyText) |
Called whenever a story node is encountered. | |
virtual void | OnVariableUpdated (string variableName, object value) |
Called whenever a dialogue variable value is updated. | |
virtual void | OnCharacterChanged (string oldCharacterName, string newCharacterName) |
Called whenever a character change is detected. | |
virtual void | OnAudioStarted (ConversationLine line) |
Called whenever audio starts playing for a line of dialogue. | |
virtual void | OnAudioCompleted (ConversationLine line, bool forceStopped) |
Called whenever audio stops playing for a line of dialogue. | |
virtual void | OnActivateKey (string key) |
Called whenever a key tag is present in a line of dialogue. | |
virtual void | Wait (float timeInSeconds) |
Called whenever the dialogue encounters a wait node. | |
virtual void | OnConversationEnding (ConversationLine line, Node nextNode) |
Called whenever the last line of dialogue in a conversation node is reached. | |
virtual void | OnNodeChanged (Node node) |
Called whenever dialogue playback moves to the next node. | |
virtual void | OnPause (string signal) |
Called whenever a pause node is reached during dialogue playback. | |
Public Attributes | |
bool | debugEnabled = false |
When set to true, debug logging will be shown for each method called on the listener. | |
UnityEvent | onContinue = new UnityEvent() |
An event which is triggered whenever the dialogue continues. | |
UnityEvent | onDisplayOptions = new UnityEvent() |
An event which is triggered whenever options are to be displayed to the player. | |
UnityEvent | onOptionChosen = new UnityEvent() |
An event which is triggered whenever the player chooses an option. | |
UnityEvent | onDisplayLine = new UnityEvent() |
An event which is triggered whenever a line of dialogue is to be displayed. | |
UnityEvent | onDialogueEntered = new UnityEvent() |
An event which is triggered whenever dialogue playback begins. | |
UnityEvent | onDialogueExited = new UnityEvent() |
An event which is triggered whenever dialogue playback ends. | |
UnityEvent | onExitCompleted = new UnityEvent() |
An event which is triggered one frame after dialogue playback ends. | |
UnityEvent | onStory = new UnityEvent() |
An event which is triggered whenever a story node is encountered. | |
UnityEvent | onVariableUpdated = new UnityEvent() |
An event which is triggered whenever a dialogue variable value is updated. | |
UnityEvent | onCharacterChanged = new UnityEvent() |
An event which is triggered whenever a character name change is detected. | |
UnityEvent | onAudioStarted = new UnityEvent() |
An event which is triggered whenever dialogue audio starts playing. | |
UnityEvent | onAudioCompleted = new UnityEvent() |
An event which is triggered whenever dialogue audio finishes playing. | |
UnityEvent | onActivateKey = new UnityEvent() |
An event which is triggered whenever a key is to be processed on a dialogue. | |
UnityEvent | onWait = new UnityEvent() |
An event which is triggered whenever a dialogue starts waiting for a certain period of time before continuing. | |
UnityEvent | onConversationEnding = new UnityEvent() |
An event which is triggered whenever the last line of dialogue in a conversation node is reached. | |
UnityEvent | onNodeChanged = new UnityEvent() |
An event which is triggered whenever a the dialogue flows from one node to another. | |
UnityEvent | onPause = new UnityEvent() |
An event which is triggered whenever the dialogue reaches a pause node, pausing and waiting for Continue() to be called. | |
The DialogueListener class defines various methods which are called as certain events occur during dialogue playback. It can be extended in order to easily create new functionality which responds to dialogue events.
|
virtual |
Called whenever a key tag is present in a line of dialogue.
key | The value of the key tag. |
Reimplemented in EasyTalk.Display.AbstractDialogueDisplay.
|
virtual |
Called whenever audio stops playing for a line of dialogue.
line | The line of dialogue which audio was being played for. |
forceStopped | Whether the audio was forced to stop (if false, the audio finished playing). |
Reimplemented in EasyTalk.Controller.DialogueController, and EasyTalk.Display.AbstractDialogueDisplay.
|
virtual |
Called whenever audio starts playing for a line of dialogue.
line | The line of dialogue which audio is being played for. |
Reimplemented in EasyTalk.Controller.DialogueController, and EasyTalk.Display.AbstractDialogueDisplay.
|
virtual |
Called whenever a character change is detected.
oldCharacterName | The old character name. |
newCharacterName | The new character name. |
Reimplemented in EasyTalk.Display.AbstractDialogueDisplay, and EasyTalk.Display.DialogueDisplay.
|
virtual |
Called whenever the dialogue continues on to the next line.
Reimplemented in EasyTalk.Display.AbstractDialogueDisplay, and EasyTalk.Display.DialogueDisplay.
|
virtual |
Called whenever the last line of dialogue in a conversation node is reached.
line | The last line of dialogue in the current conversation node. |
nextNode | The next node after the current conversation node. |
Reimplemented in EasyTalk.Controller.DialogueController, EasyTalk.Display.AbstractDialogueDisplay, and EasyTalk.Display.DialogueDisplay.
|
virtual |
Called whenever a dialogue is entered (when playback begins).
entryPointName | The name of the entry point ID where dialogue playback is starting. |
Reimplemented in EasyTalk.Controller.DialogueController, EasyTalk.Display.AbstractDialogueDisplay, and EasyTalk.Display.DialogueDisplay.
|
virtual |
Called whenever a dialogue is exited (when playback ends).
exitPointName | The name of the exit point ID where dialogue playback finished. |
Reimplemented in EasyTalk.Display.AbstractDialogueDisplay, EasyTalk.Controller.DialogueController, and EasyTalk.Display.DialogueDisplay.
|
virtual |
Called when a line of dialogue is to be presented.
conversationLine | The line of dialogue to be displayed. |
Reimplemented in EasyTalk.Display.DialogueDisplay, EasyTalk.Controller.DialogueController, and EasyTalk.Display.AbstractDialogueDisplay.
|
virtual |
Called whenever dialogue options are to be presented.
options | The list of dialogue options to present. |
Reimplemented in EasyTalk.Controller.DialogueController, EasyTalk.Display.AbstractDialogueDisplay, and EasyTalk.Display.DialogueDisplay.
|
virtual |
Called at least one frame after a dialogue is exited.
Reimplemented in EasyTalk.Display.AbstractDialogueDisplay.
|
virtual |
Called whenever dialogue playback moves to the next node.
node | The new node.. |
Reimplemented in EasyTalk.Controller.DialogueController, EasyTalk.Display.AbstractDialogueDisplay, and EasyTalk.Display.DialogueDisplay.
|
virtual |
Called whenever an option is chosen from the currently presented list of options.
option | The dialogue option which was chosen. |
Reimplemented in EasyTalk.Display.AbstractDialogueDisplay.
|
virtual |
Called whenever a pause node is reached during dialogue playback.
signal | The signal string of the pause node. |
Reimplemented in EasyTalk.Controller.DialogueController, and EasyTalk.Display.DialogueDisplay.
|
virtual |
Called whenever a story node is encountered.
storyText | The text of the story node. |
Reimplemented in EasyTalk.Display.AbstractDialogueDisplay, and EasyTalk.Display.DialogueDisplay.
|
virtual |
Called whenever a dialogue variable value is updated.
variableName | The name of the variable. |
value | The new value of the variable. |
Reimplemented in EasyTalk.Display.AbstractDialogueDisplay, and EasyTalk.Controller.DialogueController.
|
virtual |
Called whenever the dialogue encounters a wait node.
timeInSeconds | The amount of time which the dialogue will wait before proceeding (in seconds). |
Reimplemented in EasyTalk.Controller.DialogueController, and EasyTalk.Display.AbstractDialogueDisplay.
bool EasyTalk.Controller.DialogueListener.debugEnabled = false |
When set to true, debug logging will be shown for each method called on the listener.
UnityEvent EasyTalk.Controller.DialogueListener.onActivateKey = new UnityEvent() |
An event which is triggered whenever a key is to be processed on a dialogue.
UnityEvent EasyTalk.Controller.DialogueListener.onAudioCompleted = new UnityEvent() |
An event which is triggered whenever dialogue audio finishes playing.
UnityEvent EasyTalk.Controller.DialogueListener.onAudioStarted = new UnityEvent() |
An event which is triggered whenever dialogue audio starts playing.
UnityEvent EasyTalk.Controller.DialogueListener.onCharacterChanged = new UnityEvent() |
An event which is triggered whenever a character name change is detected.
UnityEvent EasyTalk.Controller.DialogueListener.onContinue = new UnityEvent() |
An event which is triggered whenever the dialogue continues.
UnityEvent EasyTalk.Controller.DialogueListener.onConversationEnding = new UnityEvent() |
An event which is triggered whenever the last line of dialogue in a conversation node is reached.
UnityEvent EasyTalk.Controller.DialogueListener.onDialogueEntered = new UnityEvent() |
An event which is triggered whenever dialogue playback begins.
UnityEvent EasyTalk.Controller.DialogueListener.onDialogueExited = new UnityEvent() |
An event which is triggered whenever dialogue playback ends.
UnityEvent EasyTalk.Controller.DialogueListener.onDisplayLine = new UnityEvent() |
An event which is triggered whenever a line of dialogue is to be displayed.
UnityEvent EasyTalk.Controller.DialogueListener.onDisplayOptions = new UnityEvent() |
An event which is triggered whenever options are to be displayed to the player.
UnityEvent EasyTalk.Controller.DialogueListener.onExitCompleted = new UnityEvent() |
An event which is triggered one frame after dialogue playback ends.
UnityEvent EasyTalk.Controller.DialogueListener.onNodeChanged = new UnityEvent() |
An event which is triggered whenever a the dialogue flows from one node to another.
UnityEvent EasyTalk.Controller.DialogueListener.onOptionChosen = new UnityEvent() |
An event which is triggered whenever the player chooses an option.
UnityEvent EasyTalk.Controller.DialogueListener.onPause = new UnityEvent() |
An event which is triggered whenever the dialogue reaches a pause node, pausing and waiting for Continue() to be called.
UnityEvent EasyTalk.Controller.DialogueListener.onStory = new UnityEvent() |
An event which is triggered whenever a story node is encountered.
UnityEvent EasyTalk.Controller.DialogueListener.onVariableUpdated = new UnityEvent() |
An event which is triggered whenever a dialogue variable value is updated.
UnityEvent EasyTalk.Controller.DialogueListener.onWait = new UnityEvent() |
An event which is triggered whenever a dialogue starts waiting for a certain period of time before continuing.