PixelCrushers.DialogueSystem.DialogueActor Class Reference

This component allows you to override the actor name used in conversations, which is normally set to the name of the GameObject. More...

Inheritance diagram for PixelCrushers.DialogueSystem.DialogueActor:
Collaboration diagram for PixelCrushers.DialogueSystem.DialogueActor:

Classes

class  BarkUISettings
 
class  StandardDialogueUISettings
 

Public Types

enum  UseMenuPanelFor { OnlyMe , MeAndResponsesToMe }
 

Public Member Functions

virtual Sprite GetPortraitSprite ()
 
virtual string GetName ()
 Deprecated alias for GetActorName.
 
virtual string GetActorName ()
 Gets the name to use for this DialogueActor, including parsing if it contains a [lua], [var], or [em#] tag.
 
virtual string GetPersistentDataName ()
 Gets the name to use when saving persistent data.
 
virtual SubtitlePanelNumber GetSubtitlePanelNumber ()
 Gets the panel number to use if using a Standard Dialogue UI.
 
virtual void SetSubtitlePanelNumber (SubtitlePanelNumber newSubtitlePanelNumber)
 Changes a dialogue actor's subtitle panel number.
 
virtual MenuPanelNumber GetMenuPanelNumber ()
 Gets the menu panel number to use if using a Standard Dialogue UI.
 
virtual void SetMenuPanelNumber (MenuPanelNumber newMenuPanelNumber)
 Changes a dialogue actor's menu panel number.
 
virtual string AdjustSubtitleColor (Subtitle subtitle)
 Applies any color settings specified in the actor's standardDialogueUISettings.
 

Static Public Member Functions

static DialogueActor GetDialogueActorComponent (Transform t)
 Searches a GameObject, including its parents and children, for a DialogueActor component.
 
static string GetActorName (Transform t)
 Gets the name of the actor, either from the GameObject or its DialogueActor if present.
 
static string GetPersistentDataName (Transform t)
 Gets the persistent data name of the actor, from the DialogueActor's persistentDataName if set, otherwise the actor name, or the GameObject name if the GameObject doesn't have a DialogueActor component.
 
static SubtitlePanelNumber GetSubtitlePanelNumber (Transform t)
 Gets the panel number to use if using a Standard Dialogue UI.
 
static IBarkUI GetBarkUI (Transform t)
 

Public Attributes

string actor
 Overrides the actor name used in conversations.
 
string persistentDataName
 The internal name to use in the dialogue database when saving persistent data.
 
Texture2D portrait
 
Sprite spritePortrait
 
BarkUISettings barkUISettings = new BarkUISettings()
 
StandardDialogueUISettings standardDialogueUISettings = new StandardDialogueUISettings()
 

Protected Member Functions

virtual void Awake ()
 
virtual void SetupBarkUI ()
 
virtual void SetupDialoguePanels ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Detailed Description

This component allows you to override the actor name used in conversations, which is normally set to the name of the GameObject.

If the override name contains a [lua] or [var] tag, it parses the value.

Member Enumeration Documentation

◆ UseMenuPanelFor

Enumerator
OnlyMe 
MeAndResponsesToMe 

Member Function Documentation

◆ AdjustSubtitleColor()

virtual string PixelCrushers.DialogueSystem.DialogueActor.AdjustSubtitleColor ( Subtitle  subtitle)
inlinevirtual

Applies any color settings specified in the actor's standardDialogueUISettings.

Parameters
subtitleThe subtitle containing the source text.
Returns
The subtitle text adjusted for the actor's color settings.

◆ Awake()

virtual void PixelCrushers.DialogueSystem.DialogueActor.Awake ( )
inlineprotectedvirtual

◆ GetActorName() [1/2]

virtual string PixelCrushers.DialogueSystem.DialogueActor.GetActorName ( )
inlinevirtual

Gets the name to use for this DialogueActor, including parsing if it contains a [lua], [var], or [em#] tag.

Returns
The name to use, or null if not set.

◆ GetActorName() [2/2]

static string PixelCrushers.DialogueSystem.DialogueActor.GetActorName ( Transform  t)
inlinestatic

Gets the name of the actor, either from the GameObject or its DialogueActor if present.

Returns
The actor name.
Parameters
tThe actor's transform.

◆ GetBarkUI()

static IBarkUI PixelCrushers.DialogueSystem.DialogueActor.GetBarkUI ( Transform  t)
inlinestatic

◆ GetDialogueActorComponent()

static DialogueActor PixelCrushers.DialogueSystem.DialogueActor.GetDialogueActorComponent ( Transform  t)
inlinestatic

Searches a GameObject, including its parents and children, for a DialogueActor component.

Parameters
tThe GameObject to search.
Returns
The DialogueActor component, or null if not found.

◆ GetMenuPanelNumber()

virtual MenuPanelNumber PixelCrushers.DialogueSystem.DialogueActor.GetMenuPanelNumber ( )
inlinevirtual

Gets the menu panel number to use if using a Standard Dialogue UI.

◆ GetName()

virtual string PixelCrushers.DialogueSystem.DialogueActor.GetName ( )
inlinevirtual

Deprecated alias for GetActorName.

◆ GetPersistentDataName() [1/2]

virtual string PixelCrushers.DialogueSystem.DialogueActor.GetPersistentDataName ( )
inlinevirtual

Gets the name to use when saving persistent data.

◆ GetPersistentDataName() [2/2]

static string PixelCrushers.DialogueSystem.DialogueActor.GetPersistentDataName ( Transform  t)
inlinestatic

Gets the persistent data name of the actor, from the DialogueActor's persistentDataName if set, otherwise the actor name, or the GameObject name if the GameObject doesn't have a DialogueActor component.

Parameters
tThe actor's transform.
Returns

◆ GetPortraitSprite()

virtual Sprite PixelCrushers.DialogueSystem.DialogueActor.GetPortraitSprite ( )
inlinevirtual

◆ GetSubtitlePanelNumber() [1/2]

virtual SubtitlePanelNumber PixelCrushers.DialogueSystem.DialogueActor.GetSubtitlePanelNumber ( )
inlinevirtual

Gets the panel number to use if using a Standard Dialogue UI.

◆ GetSubtitlePanelNumber() [2/2]

static SubtitlePanelNumber PixelCrushers.DialogueSystem.DialogueActor.GetSubtitlePanelNumber ( Transform  t)
inlinestatic

Gets the panel number to use if using a Standard Dialogue UI.

Parameters
tThe actor's transform.

◆ OnDisable()

virtual void PixelCrushers.DialogueSystem.DialogueActor.OnDisable ( )
inlineprotectedvirtual

◆ OnEnable()

virtual void PixelCrushers.DialogueSystem.DialogueActor.OnEnable ( )
inlineprotectedvirtual

◆ SetMenuPanelNumber()

virtual void PixelCrushers.DialogueSystem.DialogueActor.SetMenuPanelNumber ( MenuPanelNumber  newMenuPanelNumber)
inlinevirtual

Changes a dialogue actor's menu panel number.

If a conversation is active, updates the dialogue UI.

◆ SetSubtitlePanelNumber()

virtual void PixelCrushers.DialogueSystem.DialogueActor.SetSubtitlePanelNumber ( SubtitlePanelNumber  newSubtitlePanelNumber)
inlinevirtual

Changes a dialogue actor's subtitle panel number.

If a conversation is active, updates the dialogue UI.

◆ SetupBarkUI()

virtual void PixelCrushers.DialogueSystem.DialogueActor.SetupBarkUI ( )
inlineprotectedvirtual

◆ SetupDialoguePanels()

virtual void PixelCrushers.DialogueSystem.DialogueActor.SetupDialoguePanels ( )
inlineprotectedvirtual

Member Data Documentation

◆ actor

string PixelCrushers.DialogueSystem.DialogueActor.actor

Overrides the actor name used in conversations.

◆ barkUISettings

BarkUISettings PixelCrushers.DialogueSystem.DialogueActor.barkUISettings = new BarkUISettings()

◆ persistentDataName

string PixelCrushers.DialogueSystem.DialogueActor.persistentDataName

The internal name to use in the dialogue database when saving persistent data.

If blank, uses the override name.

◆ portrait

Texture2D PixelCrushers.DialogueSystem.DialogueActor.portrait

◆ spritePortrait

Sprite PixelCrushers.DialogueSystem.DialogueActor.spritePortrait

◆ standardDialogueUISettings

StandardDialogueUISettings PixelCrushers.DialogueSystem.DialogueActor.standardDialogueUISettings = new StandardDialogueUISettings()

The documentation for this class was generated from the following file: