PixelCrushers.DialogueSystem.Actor Class Reference

An actor asset. More...

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

Public Member Functions

 Actor ()
 Initializes a new Actor. More...
 
 Actor (Actor sourceActor)
 Copy constructor. More...
 
 Actor (ChatMapper.Actor chatMapperActor)
 Initializes a new Actor copied from a Chat Mapper actor. More...
 
void Assign (ChatMapper.Actor chatMapperActor)
 Copies a Chat Mapper actor. More...
 
Texture2D GetPortraitTexture (int i)
 Gets the portrait texture at a specific index, where 1 is the default portrait and 2+ are the alternate portraits. More...
 
- Public Member Functions inherited from PixelCrushers.DialogueSystem.Asset
 Asset ()
 Initializes a new DialogueAsset. More...
 
 Asset (Asset sourceAsset)
 Copy constructor. More...
 
 Asset (int chatMapperID, List< ChatMapper.Field > chatMapperFields)
 Initializes a new DialogueAsset copied from a Chat Mapper asset. More...
 
void Assign (int chatMapperID, List< ChatMapper.Field > chatMapperFields)
 Copies a Chat Mapper asset. More...
 
bool FieldExists (string title)
 Checks whether a field exists. More...
 
string LookupValue (string title)
 Looks up the value of a field. More...
 
string LookupLocalizedValue (string title)
 Looks up the localized value of a field for the current language. More...
 
int LookupInt (string title)
 Looks up the value of a field. More...
 
float LookupFloat (string title)
 Looks up the value of a field. More...
 
bool LookupBool (string title)
 Looks up the value of a field. More...
 
bool IsFieldAssigned (string title)
 Checks whether a field exists and has non-empty text. More...
 
Field AssignedField (string title)
 Returns a field if it exists and has non-empty text. More...
 

Public Attributes

Texture2D portrait = null
 The actor's (optional) portrait image. More...
 
List< Texture2D > alternatePortraits = new List<Texture2D>()
 The alternate portrait images. More...
 
- Public Attributes inherited from PixelCrushers.DialogueSystem.Asset
int id = 0
 Every asset has an ID number. More...
 
List< Fieldfields = null
 The asset's fields. More...
 

Properties

bool IsPlayer [get, set]
 Gets or sets a value indicating whether this actor is a player character or an NPC. More...
 
string TextureName [get, set]
 Gets or sets the texture name to use as the actor's portrait. More...
 
- Properties inherited from PixelCrushers.DialogueSystem.Asset
string Name [get, set]
 Gets or sets the Name field. More...
 
string LocalizedName [get]
 Gets the localized Name field. More...
 

Detailed Description

An actor asset.

An actor is a participant in a conversation.

Constructor & Destructor Documentation

◆ Actor() [1/3]

PixelCrushers.DialogueSystem.Actor.Actor ( )

Initializes a new Actor.

◆ Actor() [2/3]

PixelCrushers.DialogueSystem.Actor.Actor ( Actor  sourceActor)

Copy constructor.

Parameters
sourceActorSource actor.

◆ Actor() [3/3]

PixelCrushers.DialogueSystem.Actor.Actor ( ChatMapper.Actor  chatMapperActor)

Initializes a new Actor copied from a Chat Mapper actor.

Parameters
chatMapperActorThe Chat Mapper actor.

Member Function Documentation

◆ Assign()

void PixelCrushers.DialogueSystem.Actor.Assign ( ChatMapper.Actor  chatMapperActor)

Copies a Chat Mapper actor.

Parameters
chatMapperActorThe Chat Mapper actor.

◆ GetPortraitTexture()

Texture2D PixelCrushers.DialogueSystem.Actor.GetPortraitTexture ( int  i)

Gets the portrait texture at a specific index, where 1 is the default portrait and 2+ are the alternate portraits.

Returns
The portrait texture.
Parameters
iThe index number of the portrait texture.

Member Data Documentation

◆ alternatePortraits

List<Texture2D> PixelCrushers.DialogueSystem.Actor.alternatePortraits = new List<Texture2D>()

The alternate portrait images.

Corresponds to [pic=2]+ tags.

◆ portrait

Texture2D PixelCrushers.DialogueSystem.Actor.portrait = null

The actor's (optional) portrait image.

Corresponds to [pic=1] tag.

Property Documentation

◆ IsPlayer

bool PixelCrushers.DialogueSystem.Actor.IsPlayer
getset

Gets or sets a value indicating whether this actor is a player character or an NPC.

true if this actor is a player character; otherwise, false.

◆ TextureName

string PixelCrushers.DialogueSystem.Actor.TextureName
getset

Gets or sets the texture name to use as the actor's portrait.

The texture name, which is the first item in the Pictures or Texture Files fields.


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