Extends the standard DialogueController by adding functionality to either play dialogue automatically when a collider (such as a player) enters the trigger collider on the AreaDialogueController's GameObject, or sends a notification via the onPrompt UnityEvent to allow something else to determine whether the dialogue should play.
More...
|
virtual void | Prompt () |
| Triggers the onPrompt event.
|
|
virtual void | Play () |
| Plays the Dialogue and triggers the onPlay event.
|
|
virtual void | Exit () |
| Exits the Dialogue.
|
|
void | PlayDialogue (string entryPointName=null) |
| Starts playback of the dialogue at the specified entry node.
|
|
void | ChangeDialogue (Dialogue dialogue) |
| Changes the Dialogue used by the controller.
|
|
void | ExitDialogue () |
| Exits the dialogue playback immediately.
|
|
override void | OnDialogueEntered (string entryPointName) |
| Called when dialogue playback begins. This will switch conversation displays used if set to do so and call OnDialogueEntered on all Dialogue Listeners registered with the controller.
|
|
override void | OnDialogueExited (string exitPointName) |
| Called when dialogue playback exits. This will stop the autoplay routine and call OnDialogueExited on all registered Dialogue Listeners.
|
|
override void | OnDisplayOptions (List< DialogueOption > options) |
| Called whenever options are to be presented. This method filters out options which are set to not be displayed before sending the filtered list on to the OnDisplayOptions method on all registered Dialogue Listeners.
|
|
override void | OnVariableUpdated (string variableName, object variableValue) |
| Called whenever a variable value is updated in the dialogue. This method will trigger the OnVariableUpdated method on all registered Dialogue Listeners.
|
|
override void | OnDisplayLine (ConversationLine line) |
| Called whenever a line of dialogue is to be displayed. This method does the following:
-
Stops the current autoplay routine if it is running.
-
Switches conversation displays if the controller is set to do so, such as when the character changes or a target tag is specified on the l ine of dialogue.
-
Send a key tag value to any registered Dialogue Listeners via the OnActivateKey method.
-
Starts the autoplay routine or calls the OnDisplayLine method on all registered Dialogue Listeners.
-
Switches the audio to play audio for the new line of dialogue.
|
|
void | SwitchLineAudio (ConversationLine line, ConversationLine previousLine) |
| Stops any audio currently playing and starts playing audio for the provided line of dialogue.
|
|
void | CharacterChanged (string newCharacterName) |
| Called whenever a character change is detected. If this controller is set to switch conversation displays on character change, it will attempt to do so. Additionally, any Dialogue Listeners registered will have their OnCharacterChanged method triggered.
|
|
AudioSource | GetAudioSource () |
| Finds and returns an audio source on this component or its child components. If the audio source is set on the controller, it will use that audio source instead of searching components for an audio source.
|
|
bool | IsAudioPlaying () |
| Returns whether audio is currently being played by the controller.
|
|
override void | OnConversationEnding (ConversationLine currentLine, Node nextNode) |
| Called whenever the last line of dialogue in a conversation node is reached. If the next node is an option node, and options are set to be presented automatically, then the DisplayOptionsAfterDelay coroutine will be started to display options based on the delay settings. THis method also calls OnConversationEnding on all registered Dialogue Listeners.
|
|
virtual IEnumerator | GoToOptionsAfterDelay (float delay, OptionNode optionNode) |
| Tells the node handler to jump to the specified option node after a certain period of time.
|
|
void | Continue () |
| Makes the dialogue continue forward from the current point. This method will also trigger the OnContinue method on all registered Dialogue Listeners.
|
|
override void | OnAudioStarted (ConversationLine line) |
| Called whenever audio playback starts for a line of dialogue. This will call the OnAudioStarted method of all registered Dialogue Listeners.
|
|
override void | OnAudioCompleted (ConversationLine line, bool forced) |
| Called whenever audio playback finishes or is interrupted for a line of dialogue. This will call the OnAudioCompleted method of all registered Dialogue Listeners.
|
|
override void | OnNodeChanged (Node newNode) |
| Called whenever the current node being processed changes.
|
|
void | ChooseOption (DialogueOption option) |
| Chooses the specified option and calls the OnOptionChosen method of all registered Dialogue Listeners.
|
|
override void | Wait (float timeInSeconds) |
| Creates a coroutine to wait for the specified duration before continuing. This method also calls the Wait method on all registered Dialogue Listeners.
|
|
override void | OnPause (string signal) |
| Called whenever a pause node is reached during dialogue playback.- Parameters
-
signal | The signal string of the pause node. |
|
|
override void | OnWaitingForNodeEvaluation (Node asyncNode) |
|
override void | OnExecuteAsyncNode (AsyncNode node) |
|
override void | OnNodeEvaluationCompleted (Node asyncNode) |
|
NodeHandler | GetNodeHandler () |
| Returns the node handler used by this controller.
|
|
ConversationDisplay | GetConversationDisplay () |
| Returns the conversation display to use when entering dialogue playback via this controller.
|
|
string | GetConversationDisplayID () |
| Returns the Display ID of the conversation display to use when entering dialogue playback via this controller.
|
|
void | SetStringVariable (string variableName, string value) |
| Sets the value of the specified variable.
|
|
string | GetStringVariable (string variableName) |
| Returns the string value of the specified variable.
|
|
void | SetBoolVariable (string variableName, bool value) |
| Sets the value of the specified variable.
|
|
bool | GetBoolVariable (string variableName) |
| Returns the bool value of the specified variable.
|
|
void | SetIntVariable (string variableName, int value) |
| Sets the value of the specified variable.
|
|
int | GetIntVariable (string variableName) |
| Returns the int value of the specified variable.
|
|
void | SetFloatVariable (string variableName, float value) |
| Sets the value of the specified variable.
|
|
float | GetFloatVariable (string variableName) |
| Returns the float value of the specified variable.
|
|
void | AddDialogueListener (DialogueListener dialogueListener) |
| Adds the specified Dialogue Listener to the controller's list of listeners.
|
|
void | RemoveDialogueListener (DialogueListener dialogueListener) |
| Removes the specified Dialogue Listener from the controller's list of listeners.
|
|
void | RemoveDialogueListeners () |
| Removes all Dialogue Listeners from the controller.
|
|
PlaybackType | GetPlaybackType () |
| Gets the playback type of this controller.
|
|
void | SetPlaybackType (PlaybackType playbackType) |
| Sets the playback type of this controller.
|
|
void | SaveVariableValues (string prefix="", bool saveToPlayerPrefs=false) |
| Saves the values of all variables in the Dialogue to either a file, or to the PlayerPrefs.
|
|
void | SaveGlobalVariableValues (string prefix="", bool saveToPlayerPrefs=false) |
| Saves all currently loaded global variable values to PlayerPrefs or a JSON file.
|
|
void | LoadVariableValues (string prefix="", bool loadFromPlayerPrefs=false) |
| Loads the states of the Dialogue's variables from a save if available.
|
|
void | LoadGlobalVariableValues (string prefix="", bool loadFromPlayerPrefs=false) |
| Loads global variable values from PlayerPrefs or a JSON file.
|
|
void | InitializeGlobalVariables (DialogueRegistry registry=null) |
| Initializes global variable values from the Dialogue Registry provided. If the registry is null, an attempt will be made to load a registry from the active Dialogue Settings set on the node handler, and then will attempt to locate a registry on a Dialogue Display's Dialogue Settings from the scene's Hierarchy.
|
|
void | SetPlaybackType (string playbackType) |
| Sets the playback mode of the controller. If the passed in string is "auto" or "autoplay", the mode will be set to AUTOPLAY; otherwise it will be set to WAIT_FOR_COMMAND mode.
|
|
void | ChangePlaybackType () |
| Changes the playback mode of the controller to whichever mode it isn't currently in. If the controller is in WAIT_FOR_COMMAND mode, calling this method will switch it to AUTOPLAY mode, and vice versa.
|
|
virtual void | OnContinue () |
| Called whenever the dialogue continues on to the next line.
|
|
virtual void | OnOptionChosen (DialogueOption option) |
| Called whenever an option is chosen from the currently presented list of options.
|
|
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 | OnCharacterChanged (string oldCharacterName, string newCharacterName) |
| Called whenever a character change is detected.
|
|
virtual void | OnActivateKey (string key) |
| Called whenever a key tag is present in a line of dialogue.
|
|
|
UnityEvent | onPrompt = new UnityEvent() |
| An event which is triggered when the activator enters the trigger area of this GameObject and the activation mode is set to PROMPT_ON_ENTER.
|
|
UnityEvent | onAreaEntered = new UnityEvent() |
| An event which is triggered whenever the activator collider enters the trigger of this GameObject.
|
|
UnityEvent | onAreaExited = new UnityEvent() |
| An event which is triggered whenever the activator collider leaves the trigger of this GameObject.
|
|
UnityEvent | onPlay = new UnityEvent() |
| An event which is triggered when dialogue playback starts.
|
|
UnityEvent | onStop = new UnityEvent() |
| An event which is triggered when dialogue playback stops.
|
|
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.
|
|
UnityEvent | onExecuteAsyncNode = new UnityEvent() |
|
UnityEvent | onWaitingForNodeCompletion = new UnityEvent() |
|
UnityEvent | onNodeEvaluationCompleted = new UnityEvent() |
|
Extends the standard DialogueController by adding functionality to either play dialogue automatically when a collider (such as a player) enters the trigger collider on the AreaDialogueController's GameObject, or sends a notification via the onPrompt UnityEvent to allow something else to determine whether the dialogue should play.