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

This class implements logic which helps to manage animatable character portrayals/portrait displays during dialogue playback. More...

Inherits EasyTalk.Controller.DialogueListener.

Public Member Functions

override void OnDialogueExited (string exitPointName)
 When the dialogue exists, the character display will hide all of the visible characters' displays.
 
void HideAll ()
 Hides all managed character panels.
 
bool IsShowingCharacter (string characterName)
 Returns whether or not any of the managed character panels is portraying the character who has the specified name.
 
- Public Member Functions inherited from EasyTalk.Controller.DialogueListener
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 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.
 
virtual void OnExecuteAsyncNode (AsyncNode node)
 Called whenever an async node is encountered and needs some external class to handle its execution.
 
virtual void OnWaitingForNodeEvaluation (Node asyncNode)
 Called just before an asynchronous node is executed to notify listeners that the dialogue is about to enter a waiting state.
 
virtual void OnNodeEvaluationCompleted (Node asyncNode)
 Called whenever an asynchronous node's evaluation/execution has been commpleted.
 

Private Member Functions

void Awake ()
 
void Init ()
 
void FindCharacterPanels ()
 Finds all of the character sprite panels which are children of this display and adds them to the characterPanels List to be managed.
 

Private Attributes

List< CharacterSpritePanelcharacterPanels = new List<CharacterSpritePanel>()
 A List of character sprite panels which will be managed by the display.
 
bool initialized = false
 Whether the display is initialized.
 

Additional Inherited Members

- 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.
 
UnityEvent onExecuteAsyncNode = new UnityEvent()
 An event which is triggered whenever an asynchronous node must be processed.
 
UnityEvent onWaitingForNodeCompletion = new UnityEvent()
 
UnityEvent onNodeEvaluationCompleted = new UnityEvent()
 

Detailed Description

This class implements logic which helps to manage animatable character portrayals/portrait displays during dialogue playback.

Member Function Documentation

◆ Awake()

void EasyTalk.Display.CharacterDisplay.Awake ( )
private

◆ FindCharacterPanels()

void EasyTalk.Display.CharacterDisplay.FindCharacterPanels ( )
private

Finds all of the character sprite panels which are children of this display and adds them to the characterPanels List to be managed.

◆ HideAll()

void EasyTalk.Display.CharacterDisplay.HideAll ( )

Hides all managed character panels.

◆ Init()

void EasyTalk.Display.CharacterDisplay.Init ( )
private

◆ IsShowingCharacter()

bool EasyTalk.Display.CharacterDisplay.IsShowingCharacter ( string characterName)

Returns whether or not any of the managed character panels is portraying the character who has the specified name.

Parameters
characterNameThe name of the character to check.
Returns
Whether the character is being displayed on any of the managed character panels.

◆ OnDialogueExited()

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

When the dialogue exists, the character display will hide all of the visible characters' displays.

Parameters
exitPointNameThe name of the exist point for the dialogue.

Reimplemented from EasyTalk.Controller.DialogueListener.

Member Data Documentation

◆ characterPanels

List<CharacterSpritePanel> EasyTalk.Display.CharacterDisplay.characterPanels = new List<CharacterSpritePanel>()
private

A List of character sprite panels which will be managed by the display.

◆ initialized

bool EasyTalk.Display.CharacterDisplay.initialized = false
private

Whether the display is initialized.