EasyTalk API
Loading...
Searching...
No Matches
EasyTalk.Display.DialogueDisplay Class Reference

This is an implementation of a Dialogue Display which supports a conversation display (for displaying dialogue and character information), an option display (for displaying options to the player), and a continue display (for showing the player when they continue or skip ahead in the conversation). More...

Inherits EasyTalk.Display.AbstractDialogueDisplay.

Public Member Functions

override void OnDialogueEntered (string entryPointName)
 Called whenever a dialogue has begun playback. This will reset the dialogue display components to ready them for display.
 
override void OnDialogueExited (string exitPointName)
 Called whenever a dialogue exits. This will hide the display if hideDisplayOnExit is set to true; otherwise it just resets the display.
 
void Hide ()
 Hides the display components.
 
override void OnDisplayLine (ConversationLine currentLine)
 Displays the line of dialogue provided.
 
override void OnConversationEnding (ConversationLine line, Node nextNode)
 Called whenever the last line of dialogue in a conversation node is reached.
Parameters
lineThe last line of dialogue in the current conversation node.
nextNodeThe next node after the current conversation node.

 
override void OnNodeChanged (Node node)
 Called whenever dialogue playback moves to the next node.
Parameters
nodeThe new node..

 
override void OnDisplayOptions (List< DialogueOption > options)
 Displays the List of dialogue options to the player.
 
override bool SelectOptionInDirection (Vector2 direction)
 
override void ChooseSelectedOption ()
 
override bool SelectNextOption ()
 
override bool SelectPreviousOption ()
 
override void OnCharacterChanged (string oldCharacterName, string newCharacterName)
 This method is called whenever a character change is detected during dialogue playback.
 
override void OnContinue ()
 This method is called when a continue occurs.
 
override void OnStory (string storyText)
 Called whenever a story node is encountered.
Parameters
storyTextThe text of the story node.

 
void SetConversationText (ConversationLine line)
 Displays the dialogue text specified on the conversation display.
 
override ConversationDisplay GetConversationDisplay ()
 
override void SetConversationDisplay (ConversationDisplay convoDisplay)
 
override OptionDisplay GetOptionDisplay ()
 
override void SetOptionDisplay (OptionDisplay optionDisplay)
 
override ContinueDisplay GetContinueDisplay ()
 
override void SetContinueDisplay (ContinueDisplay continueDisplay)
 
override void OnPause (string signal)
 Called whenever a pause node is reached during dialogue playback.
Parameters
signalThe signal string of the pause node.

 
override void AllowContinue ()
 Allows the current conversation to be continued.
 
override void DisableContinue ()
 Disallows continuation of the current conversation.
 
- Public Member Functions inherited from EasyTalk.Display.AbstractDialogueDisplay
virtual void Continue ()
 If continuation is currently permitted, this will call the dialogue controller's Continue() method to continue to the next part of the current converstaion and disable continuation.
 
bool SelectNextOption ()
 Selects the next option in the option display (only applicable when options are being presented).
 
bool SelectPreviousOption ()
 Selects the previous option in the option display (only applicable when options are being presented).
 
void ChooseSelectedOption ()
 Chooses the selected option. This method should notify the Dialogue Controller of the option that was chosen using DialogueOption.OptionIndex.
 
bool SelectOptionInDirection (Vector2 direction)
 Selects the option which most closely corresponds to the specified direction.
 
virtual void ExitDialogue ()
 This method tells the active dialogue controller to exit the dialogue immediately.
 
void SetActiveDialogueController (DialogueController dialogueController)
 Set the active dialogue controller for the dialogue display to communicate with.
 
override void OnExitCompleted ()
 Called at least one frame after a dialogue is exited.
 
ConversationDisplay GetConversationDisplay ()
 Returns the conversation display being used by this dialogue display.
 
void SetConversationDisplay (ConversationDisplay convoDisplay)
 Sets the conversation display used by the dialogue display.
 
OptionDisplay GetOptionDisplay ()
 Returns the option display being used by this dialogue display.
 
void SetOptionDisplay (OptionDisplay optionDisplay)
 Sets the option display being used by this dialogue display.
 
ContinueDisplay GetContinueDisplay ()
 Returns the continue display being used by this dialogue display.
 
void SetContinueDisplay (ContinueDisplay continueDisplaY)
 Sets the continue display used by this dialogue display.
 
void AllowOptionSelection ()
 Allows option selection.
 
void DisableOptionSelection ()
 Disallows option selection.
 
void SetLanguage (string languageCode)
 Sets the language used by the dialogue display.
 
void AddDialogueListener (DialogueListener dialogueListener)
 Adds the specified Dialogue Listener to the list of listeners.
 
void RemoveDialogueListener (DialogueListener dialogueListener)
 Removes the specified Dialogue Listener from the list of listeners.
 
void RemoveDialogueListeners ()
 Removes all Dialogue Listeners of the display.
 
override void OnOptionChosen (DialogueOption option)
 Called whenever an option is chosen from the currently presented list of options.
Parameters
optionThe dialogue option which was chosen.

 
override void OnVariableUpdated (string variableName, object value)
 Called whenever a dialogue variable value is updated.
Parameters
variableNameThe name of the variable.
valueThe new value of the variable.

 
override void OnAudioStarted (ConversationLine line)
 Called whenever audio starts playing for a line of dialogue.
Parameters
lineThe line of dialogue which audio is being played for.

 
override void OnAudioCompleted (ConversationLine line, bool forceStopped)
 Called whenever audio stops playing for a line of dialogue.
Parameters
lineThe line of dialogue which audio was being played for.
forceStoppedWhether the audio was forced to stop (if false, the audio finished playing).

 
override void OnActivateKey (string key)
 Called whenever a key tag is present in a line of dialogue.
Parameters
keyThe value of the key tag.

 
override void Wait (float timeInSeconds)
 Called whenever the dialogue encounters a wait node.
Parameters
timeInSecondsThe amount of time which the dialogue will wait before proceeding (in seconds).

 

Protected Member Functions

override void Init ()
 Initializes the dialogue display.
 
virtual IEnumerator PlayAutoConversation (ConversationLine lineToPlay, ConversationLine oldLine=null)
 Calls OnDisplayLine on all registered Dialogue Listeners to display the specified line of dialogue and continues automatically after a certain period of time, depending on any audio file attributed to the line of dialogue, timePerWord, convoLineDelay, and minConvoTime settings. After the necessary amount of time has elapsed, this method will trigger the OnContinue method of all registered Dialogue Listeners.
 
- Protected Member Functions inherited from EasyTalk.Display.AbstractDialogueDisplay
void LanguageChanged (string oldLanguage, string newLanguage)
 This method is called whenever the language is changed by setting the language on the EasyTalkGameState.
 
void TranslateComponents ()
 Translates the text set on the conversation display and option display based on the currently set language of EasyTalkGameState.Instance.
 
void UpdateFontsForLanguage (Component component)
 Updates all of the fonts on child text components based on the language currently being used.
 

Protected Attributes

ConversationDisplay convoDisplay
 The conversation display to use when displaying dialogue.
 
OptionDisplay optionDisplay
 The option display to use when displaying options.
 
ContinueDisplay continueDisplay
 The continue display to use when indicating to the player that they can continue on in a conversation.
 
string defaultConvoDisplayID = "main"
 The default Conversation Display ID to use when a Dialogue Controller doesn't specify a Conversation Display or ID.
 
bool hideDisplayOnExit = false
 Whether the dialogue display should be hidden when a dialogue is exited.
 
bool hideOnPause = false
 Whether the conversation display should be hidden when a pause node is reached.
 
bool hideConvoWhenShowingOptions = false
 Whether the conversation display should be hidden when options are being presented to the player.
 
bool clearConvoWhenShowingOptions = false
 Whether the conversation display should be reset when options are being presented.
 
bool refreshConvoOnCharacterChange = true
 Whether the conversation dispaly should be hidden and updated offscreen whenever the a character change is detected.
 
bool refreshConvoOnTextChange = false
 Whether the conversation display should be hidden and updated offscreen whenever the dialogue text changes.
 
bool areLinesSkippable = false
 Whether lines of dialogue can be skipped before their audio or display time is completed.
 
float timePerWord = 0.2f
 The amount of time each word should count toward the total display time of a line of dialogue if there is no audio file.
 
float minConvoTime = 1.0f
 The minimum amount of time a line of dialogue will be shown when in AUTOPLAY playback mode.
 
float convoLineDelay = 1.0f
 A delay which is added on top of the normal display time for a line of dialogue when in AUTOPLAY playback mode.
 
bool switchConvoDisplayOnCharacterChange = false
 When set to true, the display will attempt to find a conversation display with a display ID matching the new (untranslated) character name and set the dialogue display to use that, if found.
 
float optionDelay = 2.0f
 The delay to use when presenting options.
 
bool continueOnStory = true
 Whether the dialogue display should automatically call Continue() on the Dialogue Controller when a story node is encountered.
 
- Protected Attributes inherited from EasyTalk.Display.AbstractDialogueDisplay
EasyTalkDialogueSettings dialogueSettings
 The EasyTalk dialogue settings to use.
 
DialogueController dialogueController
 The currently active dialogue controller.
 
bool destroyOnLoad = false
 When true, the dialogue display will be destroyed when a new scene is loaded.
 
List< DialogueListenerdialogueListeners = new List<DialogueListener>()
 A collection of Dialogue Listeners to call as dialogue playback occurs.
 

Properties

DialogueDelayMode ContinuationMode [get, set]
 Gets or sets the dialogue continuation mode to use.
 
float ContinuationDelay [get, set]
 Gets or sets the dialogue continuation delay.
 
bool UseContinueDisplay [get, set]
 Gets or sets whether the dialogue display should use a continue display during dialogue playback.
 
bool SwitchConvoDisplayOnCharacterChange [get, set]
 Gets or sets whether the conversation display should be switched when a character change is detected.
 
bool PresentOptionsAutomatically [get, set]
 Gets or sets whether options should be presented automatically as a conversation node is ending.
 
DialogueDelayMode OptionDelayMode [get, set]
 Gets or sets the delay mode to use when presenting options.
 
- Properties inherited from EasyTalk.Display.AbstractDialogueDisplay
bool IsPlaying = false [get, private set]
 A flag indicating whether the display is currently playing a dialogue.
 
bool IsCurrentlyInConversation = false [get, protected set]
 A flag indicating whether the dialogue is currently displaying a conversation (rather than options).
 
static AbstractDialogueDisplay Instance [get]
 Gets the dialogue display instance.
 
DialogueController CurrentController [get]
 Returns the current DialogueController being used by this dialogue display, if there is one.
 
bool IsOptionSelectionAllowed [get, set]
 Gets or sets whether the dialogue is currently allowing options to be selected by the player.
 
bool IsQuickExitAllowed [get, set]
 Gets or sets whether the player is allowed to immediately exit the dialogue by pressing a button.
 
bool IsContinueAllowed [get, set]
 Gets or sets whether continuation is allowed by the player by pressing a button.
 

Private Member Functions

void Awake ()
 
void Reset ()
 Resets the display by disabling continuation and option selection, deactivating option buttons, and resetting the dialogue text.
 
void DisplayLine (ConversationLine currentLine)
 Handles the logic to display the specified line of Dialogue. This method also calls OnDisplayLine() on all Dialogue Listeners.
 
IEnumerator DisplayConversationLineAsync (ConversationLine currentLine, bool hideWhileUpdating=false)
 Asynchronously displays the line of dialogue provided, transitioning the conversation display to be shown if it is currently hidden.
 
void UseConversationDisplayForTarget (string target)
 Searches for a conversation display with a Display ID the same as the target (if not null or empty) and sets the dialogue display to use that conversation display if found. This method will also tell the dialogue display to hide the current conversation display being displayed, if there is one.
 
void SetLinePlayTime (ConversationLine line)
 Determines the minimum recommended amount of time to display the specified line of dialogue, based on the associated audio file, or if there is no associated audio file, based on the number of words in the line.
 
IEnumerator WaitForContinue ()
 Waits to allow the player to continue based on the dialogue delay mode set on this display.
 
IEnumerator DisplayOptionsAsync (List< DialogueOption > options)
 Asynchronously displays the provided list of dialogue options to the player and enables option selection once the options are displayed.
 
void StopDelayedOptionDisplay ()
 Stops an in-progress automatic option presentation from being triggered.
 
void InitializeOptionDisplay ()
 Sets up the option display to trigger the ChooseSelectedOption method whenever an option is chosen.
 
void DeinitializeOptionDisplay ()
 Removes the ChooseSelectedOption method from being triggered by the current option display.
 
void InitializeContinueDisplay ()
 Sets up the continue display to tell the dialogue display that it is ready for dialogue continuation when the continue display is shown.
 
void DeinitializeContinueDisplay ()
 Removes the listener which allows continuation after the continue display is shown.
 

Private Attributes

bool useContinueDisplay = true
 Whether the continue display should be used to let the player know when they can continue or skip ahead.
 
DialogueDelayMode continuationMode = DialogueDelayMode.IMMEDIATE
 The continuation mode of the dialogue display. This determiens when the player is allowed to continue or skip ahead.
 
float continuationDelay = 1.0f
 The minimum amount of time a line of dialogue will be shown before permitting the player to continue or skip ahead.
 
bool presentOptionsAutomatically = false
 Whether options should be presented automatically after the prior line of dialogue. If this is false, then options won't be shown until Continue() is called.
 
DialogueDelayMode optionDelayMode = DialogueDelayMode.IMMEDIATE
 Determines how/when options are displayed when an option node is processed, either immediately, after a delay, or after a line of dialogue's audio is completed.
 
Coroutine displayOptionsAfterDelayRoutine
 The coroutine for delaying options after a certain amount of time.
 
Coroutine setTextRoutine = null
 A coroutine for updating the dialogue text.
 
Coroutine autoplayRoutine
 The coroutine for automaticallly playing lines of dialogue.
 
string currentTarget = null
 The display ID of the conversation display currently being targeted.
 
ConversationLine currentLine = null
 The line of dialogue currently being displayed.
 
List< DialogueOptiondisplayedOptions
 The List of dialogue options currently being presented.
 
bool allowAutoContinue = true
 A flag used to control whether automatic continuation is allowed when the controller is in Autoplay mode. (Prevents Continue() from being called when options are about to be shown).
 

Additional Inherited Members

- Public Attributes inherited from EasyTalk.Display.AbstractDialogueDisplay
UnityEvent onContinueEnabled
 A Unity Event which is triggered whenever continuation of the current dialogue is allowed.
 
UnityEvent onContinueDisabled
 A Unity Event which is triggered whenever continuation of the current dialogue is disabled.
 
UnityEvent onOptionSelectionEnabled
 A Unity Event which is triggered whenever option selection is enabled (after options are presented).
 
UnityEvent onOptionSelectionDisabled
 A Unity Event which is triggered whenever option selection is disabled (after an option is chosen).
 
- Public Attributes inherited from EasyTalk.Controller.DialogueListener
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.
 
- Static Protected Attributes inherited from EasyTalk.Display.AbstractDialogueDisplay
static AbstractDialogueDisplay instance
 An instance of a Dialogue Display.
 

Detailed Description

This is an implementation of a Dialogue Display which supports a conversation display (for displaying dialogue and character information), an option display (for displaying options to the player), and a continue display (for showing the player when they continue or skip ahead in the conversation).

Member Function Documentation

◆ AllowContinue()

override void EasyTalk.Display.DialogueDisplay.AllowContinue ( )
virtual

Allows the current conversation to be continued.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ Awake()

void EasyTalk.Display.DialogueDisplay.Awake ( )
private

◆ ChooseSelectedOption()

override void EasyTalk.Display.DialogueDisplay.ChooseSelectedOption ( )

◆ DeinitializeContinueDisplay()

void EasyTalk.Display.DialogueDisplay.DeinitializeContinueDisplay ( )
private

Removes the listener which allows continuation after the continue display is shown.

◆ DeinitializeOptionDisplay()

void EasyTalk.Display.DialogueDisplay.DeinitializeOptionDisplay ( )
private

Removes the ChooseSelectedOption method from being triggered by the current option display.

◆ DisableContinue()

override void EasyTalk.Display.DialogueDisplay.DisableContinue ( )
virtual

Disallows continuation of the current conversation.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ DisplayConversationLineAsync()

IEnumerator EasyTalk.Display.DialogueDisplay.DisplayConversationLineAsync ( ConversationLine currentLine,
bool hideWhileUpdating = false )
private

Asynchronously displays the line of dialogue provided, transitioning the conversation display to be shown if it is currently hidden.

Parameters
currentLineThe line of dialogue to display.
hideWhileUpdatingWhether the conversation display needs to be hidden prior to updating the dialogue text.
Returns

◆ DisplayLine()

void EasyTalk.Display.DialogueDisplay.DisplayLine ( ConversationLine currentLine)
private

Handles the logic to display the specified line of Dialogue. This method also calls OnDisplayLine() on all Dialogue Listeners.

Parameters
currentLineThe line of dialogue to display.

◆ DisplayOptionsAsync()

IEnumerator EasyTalk.Display.DialogueDisplay.DisplayOptionsAsync ( List< DialogueOption > options)
private

Asynchronously displays the provided list of dialogue options to the player and enables option selection once the options are displayed.

Parameters
optionsThe list of dialogue options to display.
Returns

◆ GetContinueDisplay()

override ContinueDisplay EasyTalk.Display.DialogueDisplay.GetContinueDisplay ( )

◆ GetConversationDisplay()

override ConversationDisplay EasyTalk.Display.DialogueDisplay.GetConversationDisplay ( )

◆ GetOptionDisplay()

override OptionDisplay EasyTalk.Display.DialogueDisplay.GetOptionDisplay ( )

◆ Hide()

void EasyTalk.Display.DialogueDisplay.Hide ( )

Hides the display components.

◆ Init()

override void EasyTalk.Display.DialogueDisplay.Init ( )
protectedvirtual

Initializes the dialogue display.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ InitializeContinueDisplay()

void EasyTalk.Display.DialogueDisplay.InitializeContinueDisplay ( )
private

Sets up the continue display to tell the dialogue display that it is ready for dialogue continuation when the continue display is shown.

◆ InitializeOptionDisplay()

void EasyTalk.Display.DialogueDisplay.InitializeOptionDisplay ( )
private

Sets up the option display to trigger the ChooseSelectedOption method whenever an option is chosen.

◆ OnCharacterChanged()

override void EasyTalk.Display.DialogueDisplay.OnCharacterChanged ( string oldCharacterName,
string newCharacterName )
virtual

This method is called whenever a character change is detected during dialogue playback.

Parameters
oldCharacterNameThe name of the previous character.
newCharacterNameThe name of the new character.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ OnContinue()

override void EasyTalk.Display.DialogueDisplay.OnContinue ( )
virtual

This method is called when a continue occurs.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ OnConversationEnding()

override void EasyTalk.Display.DialogueDisplay.OnConversationEnding ( ConversationLine line,
Node nextNode )
virtual

Called whenever the last line of dialogue in a conversation node is reached.

Parameters
lineThe last line of dialogue in the current conversation node.
nextNodeThe next node after the current conversation node.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ OnDialogueEntered()

override void EasyTalk.Display.DialogueDisplay.OnDialogueEntered ( string entryPointName)
virtual

Called whenever a dialogue has begun playback. This will reset the dialogue display components to ready them for display.

Parameters
entryPointNameThe name of the entry point where the playback began.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ OnDialogueExited()

override void EasyTalk.Display.DialogueDisplay.OnDialogueExited ( string exitPointName)
virtual

Called whenever a dialogue exits. This will hide the display if hideDisplayOnExit is set to true; otherwise it just resets the display.

Parameters
exitPointNameThe name of the exit point where the dialogue exited.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ OnDisplayLine()

override void EasyTalk.Display.DialogueDisplay.OnDisplayLine ( ConversationLine currentLine)
virtual

Displays the line of dialogue provided.

Parameters
currentLineThe line of dialogue to display.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ OnDisplayOptions()

override void EasyTalk.Display.DialogueDisplay.OnDisplayOptions ( List< DialogueOption > options)
virtual

Displays the List of dialogue options to the player.

Parameters
optionsThe List of dialogue options to display.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ OnNodeChanged()

override void EasyTalk.Display.DialogueDisplay.OnNodeChanged ( Node node)
virtual

Called whenever dialogue playback moves to the next node.

Parameters
nodeThe new node..

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ OnPause()

override void EasyTalk.Display.DialogueDisplay.OnPause ( string signal)
virtual

Called whenever a pause node is reached during dialogue playback.

Parameters
signalThe signal string of the pause node.

Reimplemented from EasyTalk.Controller.DialogueListener.

◆ OnStory()

override void EasyTalk.Display.DialogueDisplay.OnStory ( string storyText)
virtual

Called whenever a story node is encountered.

Parameters
storyTextThe text of the story node.

Reimplemented from EasyTalk.Display.AbstractDialogueDisplay.

◆ PlayAutoConversation()

virtual IEnumerator EasyTalk.Display.DialogueDisplay.PlayAutoConversation ( ConversationLine lineToPlay,
ConversationLine oldLine = null )
protectedvirtual

Calls OnDisplayLine on all registered Dialogue Listeners to display the specified line of dialogue and continues automatically after a certain period of time, depending on any audio file attributed to the line of dialogue, timePerWord, convoLineDelay, and minConvoTime settings. After the necessary amount of time has elapsed, this method will trigger the OnContinue method of all registered Dialogue Listeners.

Parameters
lineToPlayThe line of dialogue to start from.
oldLineThe previous line of dialogue.
Returns

◆ Reset()

void EasyTalk.Display.DialogueDisplay.Reset ( )
private

Resets the display by disabling continuation and option selection, deactivating option buttons, and resetting the dialogue text.

◆ SelectNextOption()

override bool EasyTalk.Display.DialogueDisplay.SelectNextOption ( )

◆ SelectOptionInDirection()

override bool EasyTalk.Display.DialogueDisplay.SelectOptionInDirection ( Vector2 direction)

◆ SelectPreviousOption()

override bool EasyTalk.Display.DialogueDisplay.SelectPreviousOption ( )

◆ SetContinueDisplay()

override void EasyTalk.Display.DialogueDisplay.SetContinueDisplay ( ContinueDisplay continueDisplay)

◆ SetConversationDisplay()

override void EasyTalk.Display.DialogueDisplay.SetConversationDisplay ( ConversationDisplay convoDisplay)

◆ SetConversationText()

void EasyTalk.Display.DialogueDisplay.SetConversationText ( ConversationLine line)

Displays the dialogue text specified on the conversation display.

Parameters
lineThe line of dialogue to display.

◆ SetLinePlayTime()

void EasyTalk.Display.DialogueDisplay.SetLinePlayTime ( ConversationLine line)
private

Determines the minimum recommended amount of time to display the specified line of dialogue, based on the associated audio file, or if there is no associated audio file, based on the number of words in the line.

Parameters
lineThe line of dialogue to determine display time for.

◆ SetOptionDisplay()

override void EasyTalk.Display.DialogueDisplay.SetOptionDisplay ( OptionDisplay optionDisplay)

◆ StopDelayedOptionDisplay()

void EasyTalk.Display.DialogueDisplay.StopDelayedOptionDisplay ( )
private

Stops an in-progress automatic option presentation from being triggered.

◆ UseConversationDisplayForTarget()

void EasyTalk.Display.DialogueDisplay.UseConversationDisplayForTarget ( string target)
private

Searches for a conversation display with a Display ID the same as the target (if not null or empty) and sets the dialogue display to use that conversation display if found. This method will also tell the dialogue display to hide the current conversation display being displayed, if there is one.

Parameters
targetThe display ID of the target conversation display.

◆ WaitForContinue()

IEnumerator EasyTalk.Display.DialogueDisplay.WaitForContinue ( )
private

Waits to allow the player to continue based on the dialogue delay mode set on this display.

Returns

Member Data Documentation

◆ allowAutoContinue

bool EasyTalk.Display.DialogueDisplay.allowAutoContinue = true
private

A flag used to control whether automatic continuation is allowed when the controller is in Autoplay mode. (Prevents Continue() from being called when options are about to be shown).

◆ areLinesSkippable

bool EasyTalk.Display.DialogueDisplay.areLinesSkippable = false
protected

Whether lines of dialogue can be skipped before their audio or display time is completed.

◆ autoplayRoutine

Coroutine EasyTalk.Display.DialogueDisplay.autoplayRoutine
private

The coroutine for automaticallly playing lines of dialogue.

◆ clearConvoWhenShowingOptions

bool EasyTalk.Display.DialogueDisplay.clearConvoWhenShowingOptions = false
protected

Whether the conversation display should be reset when options are being presented.

◆ continuationDelay

float EasyTalk.Display.DialogueDisplay.continuationDelay = 1.0f
private

The minimum amount of time a line of dialogue will be shown before permitting the player to continue or skip ahead.

◆ continuationMode

DialogueDelayMode EasyTalk.Display.DialogueDisplay.continuationMode = DialogueDelayMode.IMMEDIATE
private

The continuation mode of the dialogue display. This determiens when the player is allowed to continue or skip ahead.

◆ continueDisplay

ContinueDisplay EasyTalk.Display.DialogueDisplay.continueDisplay
protected

The continue display to use when indicating to the player that they can continue on in a conversation.

◆ continueOnStory

bool EasyTalk.Display.DialogueDisplay.continueOnStory = true
protected

Whether the dialogue display should automatically call Continue() on the Dialogue Controller when a story node is encountered.

◆ convoDisplay

ConversationDisplay EasyTalk.Display.DialogueDisplay.convoDisplay
protected

The conversation display to use when displaying dialogue.

◆ convoLineDelay

float EasyTalk.Display.DialogueDisplay.convoLineDelay = 1.0f
protected

A delay which is added on top of the normal display time for a line of dialogue when in AUTOPLAY playback mode.

◆ currentLine

ConversationLine EasyTalk.Display.DialogueDisplay.currentLine = null
private

The line of dialogue currently being displayed.

◆ currentTarget

string EasyTalk.Display.DialogueDisplay.currentTarget = null
private

The display ID of the conversation display currently being targeted.

◆ defaultConvoDisplayID

string EasyTalk.Display.DialogueDisplay.defaultConvoDisplayID = "main"
protected

The default Conversation Display ID to use when a Dialogue Controller doesn't specify a Conversation Display or ID.

◆ displayedOptions

List<DialogueOption> EasyTalk.Display.DialogueDisplay.displayedOptions
private

The List of dialogue options currently being presented.

◆ displayOptionsAfterDelayRoutine

Coroutine EasyTalk.Display.DialogueDisplay.displayOptionsAfterDelayRoutine
private

The coroutine for delaying options after a certain amount of time.

◆ hideConvoWhenShowingOptions

bool EasyTalk.Display.DialogueDisplay.hideConvoWhenShowingOptions = false
protected

Whether the conversation display should be hidden when options are being presented to the player.

◆ hideDisplayOnExit

bool EasyTalk.Display.DialogueDisplay.hideDisplayOnExit = false
protected

Whether the dialogue display should be hidden when a dialogue is exited.

◆ hideOnPause

bool EasyTalk.Display.DialogueDisplay.hideOnPause = false
protected

Whether the conversation display should be hidden when a pause node is reached.

◆ minConvoTime

float EasyTalk.Display.DialogueDisplay.minConvoTime = 1.0f
protected

The minimum amount of time a line of dialogue will be shown when in AUTOPLAY playback mode.

◆ optionDelay

float EasyTalk.Display.DialogueDisplay.optionDelay = 2.0f
protected

The delay to use when presenting options.

◆ optionDelayMode

DialogueDelayMode EasyTalk.Display.DialogueDisplay.optionDelayMode = DialogueDelayMode.IMMEDIATE
private

Determines how/when options are displayed when an option node is processed, either immediately, after a delay, or after a line of dialogue's audio is completed.

◆ optionDisplay

OptionDisplay EasyTalk.Display.DialogueDisplay.optionDisplay
protected

The option display to use when displaying options.

◆ presentOptionsAutomatically

bool EasyTalk.Display.DialogueDisplay.presentOptionsAutomatically = false
private

Whether options should be presented automatically after the prior line of dialogue. If this is false, then options won't be shown until Continue() is called.

◆ refreshConvoOnCharacterChange

bool EasyTalk.Display.DialogueDisplay.refreshConvoOnCharacterChange = true
protected

Whether the conversation dispaly should be hidden and updated offscreen whenever the a character change is detected.

◆ refreshConvoOnTextChange

bool EasyTalk.Display.DialogueDisplay.refreshConvoOnTextChange = false
protected

Whether the conversation display should be hidden and updated offscreen whenever the dialogue text changes.

◆ setTextRoutine

Coroutine EasyTalk.Display.DialogueDisplay.setTextRoutine = null
private

A coroutine for updating the dialogue text.

◆ switchConvoDisplayOnCharacterChange

bool EasyTalk.Display.DialogueDisplay.switchConvoDisplayOnCharacterChange = false
protected

When set to true, the display will attempt to find a conversation display with a display ID matching the new (untranslated) character name and set the dialogue display to use that, if found.

◆ timePerWord

float EasyTalk.Display.DialogueDisplay.timePerWord = 0.2f
protected

The amount of time each word should count toward the total display time of a line of dialogue if there is no audio file.

◆ useContinueDisplay

bool EasyTalk.Display.DialogueDisplay.useContinueDisplay = true
private

Whether the continue display should be used to let the player know when they can continue or skip ahead.

Property Documentation

◆ ContinuationDelay

float EasyTalk.Display.DialogueDisplay.ContinuationDelay
getset

Gets or sets the dialogue continuation delay.

◆ ContinuationMode

DialogueDelayMode EasyTalk.Display.DialogueDisplay.ContinuationMode
getset

Gets or sets the dialogue continuation mode to use.

◆ OptionDelayMode

DialogueDelayMode EasyTalk.Display.DialogueDisplay.OptionDelayMode
getset

Gets or sets the delay mode to use when presenting options.

◆ PresentOptionsAutomatically

bool EasyTalk.Display.DialogueDisplay.PresentOptionsAutomatically
getset

Gets or sets whether options should be presented automatically as a conversation node is ending.

◆ SwitchConvoDisplayOnCharacterChange

bool EasyTalk.Display.DialogueDisplay.SwitchConvoDisplayOnCharacterChange
getset

Gets or sets whether the conversation display should be switched when a character change is detected.

◆ UseContinueDisplay

bool EasyTalk.Display.DialogueDisplay.UseContinueDisplay
getset

Gets or sets whether the dialogue display should use a continue display during dialogue playback.