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

A UI component used to display a character image. More...

Inherits EasyTalk.Display.ConversationDisplayListener.

Public Member Functions

override void OnCharacterNameUpdated (string characterName, string sourceName)
 Updates the character image sprite to show the sprite for the current character.
 
override void OnReset ()
 Disables the character image when reset.
 
- Public Member Functions inherited from EasyTalk.Display.ConversationDisplayListener
virtual void OnConversationTextUpdated (string text)
 Called whenever the text of a conversation display is updated.
 

Private Member Functions

void Awake ()
 Searches for an image component to use on the GameObject if one isn't set for the character image.
 

Private Attributes

Image characterIconImage
 The Image component used to display the character image.
 
List< CharacterImagecharacterImages = new List<CharacterImage>()
 A List of Character Image configurations mapping character names to sprites to use for each character.
 

Additional Inherited Members

- Protected Attributes inherited from EasyTalk.Display.ConversationDisplayListener
bool debug = false
 When set to true, debug logging will be shown for each method called on the listener.
 

Detailed Description

A UI component used to display a character image.

Member Function Documentation

◆ Awake()

void EasyTalk.Display.CharacterImageDisplay.Awake ( )
private

Searches for an image component to use on the GameObject if one isn't set for the character image.

◆ OnCharacterNameUpdated()

override void EasyTalk.Display.CharacterImageDisplay.OnCharacterNameUpdated ( string characterName,
string sourceName )
virtual

Updates the character image sprite to show the sprite for the current character.

Parameters
characterNameThe derived/translated name of the character a sprite should be shown for (ignored in this method).
sourceNameThe original/source name of the character a sprite should be shown for.

Reimplemented from EasyTalk.Display.ConversationDisplayListener.

◆ OnReset()

override void EasyTalk.Display.CharacterImageDisplay.OnReset ( )
virtual

Disables the character image when reset.

Reimplemented from EasyTalk.Display.ConversationDisplayListener.

Member Data Documentation

◆ characterIconImage

Image EasyTalk.Display.CharacterImageDisplay.characterIconImage
private

The Image component used to display the character image.

◆ characterImages

List<CharacterImage> EasyTalk.Display.CharacterImageDisplay.characterImages = new List<CharacterImage>()
private

A List of Character Image configurations mapping character names to sprites to use for each character.