An actor asset in a DialogueDatabase. More...
Public Member Functions | |
Actor () | |
Initializes a new Actor. | |
Actor (Actor sourceActor) | |
Copy constructor. | |
Actor (ChatMapper.Actor chatMapperActor) | |
Initializes a new Actor copied from a Chat Mapper actor. | |
void | Assign (ChatMapper.Actor chatMapperActor) |
Copies a Chat Mapper actor. | |
Sprite | GetPortraitSprite (int i) |
Gets the portrait sprite at a specific index, where 1 is the default portrait and 2 + are the alternate portraits. | |
Sprite | GetPortraitSprite () |
Returns the actor's current portrait sprite. | |
Sprite | GetPortraitSprite (string imageName) |
Checks if a named image is assigned to the actor. | |
delegate void | AssignSpriteDelegate (Sprite sprite) |
void | AssignPortraitSprite (AssignSpriteDelegate assignSprite) |
Public Member Functions inherited from PixelCrushers.DialogueSystem.Asset | |
Asset () | |
Initializes a new DialogueAsset. | |
Asset (Asset sourceAsset) | |
Copy constructor. | |
Asset (int chatMapperID, List< ChatMapper.Field > chatMapperFields) | |
Initializes a new DialogueAsset copied from a Chat Mapper asset. | |
void | Assign (int chatMapperID, List< ChatMapper.Field > chatMapperFields) |
Copies a Chat Mapper asset. | |
bool | FieldExists (string title) |
Checks whether a field exists. | |
string | LookupValue (string title) |
Looks up the value of a field. | |
string | LookupLocalizedValue (string title) |
Looks up the localized value of a field for the current language. | |
int | LookupInt (string title) |
Looks up the value of a field. | |
float | LookupFloat (string title) |
Looks up the value of a field. | |
bool | LookupBool (string title) |
Looks up the value of a field. | |
bool | IsFieldAssigned (string title) |
Checks whether a field exists and has non-empty text. | |
Field | AssignedField (string title) |
Returns a field if it exists and has non-empty text. | |
Public Attributes | |
Texture2D | portrait = null |
The actor's (optional) portrait image. | |
Sprite | spritePortrait = null |
Sprite portrait. | |
List< Texture2D > | alternatePortraits = new List<Texture2D>() |
The alternate portrait images. | |
List< Sprite > | spritePortraits = new List<Sprite>() |
Alternate portrait sprites. | |
Public Attributes inherited from PixelCrushers.DialogueSystem.Asset | |
int | id = 0 |
Every asset has an ID number. | |
List< Field > | fields = null |
The asset's fields. | |
Properties | |
bool | IsPlayer [get, set] |
Gets or sets a value indicating whether this actor is a player character or an NPC. | |
string | textureName [get, set] |
Gets or sets the texture name to use as the actor's portrait. | |
Properties inherited from PixelCrushers.DialogueSystem.Asset | |
string | Name [get, set] |
Gets or sets the Name field. | |
string | localizedName [get] |
Gets the localized Name field. | |
string | Description [get, set] |
Gets or sets the Description field, which is optional and may not exist. | |
An actor asset in a DialogueDatabase.
An actor is a participant in a conversation.
|
inline |
Initializes a new Actor.
|
inline |
Copy constructor.
sourceActor | Source actor. |
|
inline |
Initializes a new Actor copied from a Chat Mapper actor.
chatMapperActor | The Chat Mapper actor. |
|
inline |
Copies a Chat Mapper actor.
chatMapperActor | The Chat Mapper actor. |
|
inline |
delegate void PixelCrushers.DialogueSystem.Actor.AssignSpriteDelegate | ( | Sprite | sprite | ) |
|
inline |
Returns the actor's current portrait sprite.
|
inline |
Gets the portrait sprite at a specific index, where 1
is the default portrait and 2
+ are the alternate portraits.
Checks the actor's textures and sprites.
i | The index number of the portrait image. |
|
inline |
Checks if a named image is assigned to the actor.
If so, returns it. Otherwise returns null.
List<Texture2D> PixelCrushers.DialogueSystem.Actor.alternatePortraits = new List<Texture2D>() |
The alternate portrait images.
Corresponds to [pic=2]+
tags.
Texture2D PixelCrushers.DialogueSystem.Actor.portrait = null |
The actor's (optional) portrait image.
Corresponds to [pic=1]
tag.
Sprite PixelCrushers.DialogueSystem.Actor.spritePortrait = null |
Sprite portrait.
Allows you to assign a Sprite instead of a full Texture.
List<Sprite> PixelCrushers.DialogueSystem.Actor.spritePortraits = new List<Sprite>() |
Alternate portrait sprites.
Allows you to assign Sprites instead of full Textures.
|
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
.
|
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.