PixelCrushers.DialogueSystem.Asset Class Reference

The base class of all assets such as actors, conversations, items, locations and variables found in a DialogueDatabase. More...

Inheritance diagram for PixelCrushers.DialogueSystem.Asset:

Public Member Functions

 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

int id = 0
 Every asset has an ID number.
 
List< Fieldfields = null
 The asset's fields.
 

Properties

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.
 

Detailed Description

The base class of all assets such as actors, conversations, items, locations and variables found in a DialogueDatabase.

Constructor & Destructor Documentation

◆ Asset() [1/3]

PixelCrushers.DialogueSystem.Asset.Asset ( )
inline

Initializes a new DialogueAsset.

◆ Asset() [2/3]

PixelCrushers.DialogueSystem.Asset.Asset ( Asset  sourceAsset)
inline

Copy constructor.

Parameters
sourceAssetSource asset.

◆ Asset() [3/3]

PixelCrushers.DialogueSystem.Asset.Asset ( int  chatMapperID,
List< ChatMapper::Field chatMapperFields 
)
inline

Initializes a new DialogueAsset copied from a Chat Mapper asset.

Parameters
chatMapperIDThe Chat Mapper asset's ID.
chatMapperFieldsThe Chat Mapper asset's fields.

Member Function Documentation

◆ Assign()

void PixelCrushers.DialogueSystem.Asset.Assign ( int  chatMapperID,
List< ChatMapper::Field chatMapperFields 
)
inline

Copies a Chat Mapper asset.

Parameters
chatMapperIDChat Mapper asset's ID.
chatMapperFieldsThe Chat Mapper asset's fields.

◆ AssignedField()

Field PixelCrushers.DialogueSystem.Asset.AssignedField ( string  title)
inline

Returns a field if it exists and has non-empty text.

Returns
The field, or null if it doesn't exist or has empty text.
Parameters
titleTitle of the field.

◆ FieldExists()

bool PixelCrushers.DialogueSystem.Asset.FieldExists ( string  title)
inline

Checks whether a field exists.

Returns
true if the field exists; otherwise false.
Parameters
titleTitle of the field.

◆ IsFieldAssigned()

bool PixelCrushers.DialogueSystem.Asset.IsFieldAssigned ( string  title)
inline

Checks whether a field exists and has non-empty text.

Returns
true if the field is assigned; otherwise, false.
Parameters
titleTitle of the field.

◆ LookupBool()

bool PixelCrushers.DialogueSystem.Asset.LookupBool ( string  title)
inline

Looks up the value of a field.

Returns
The bool value of the field with the specified title, or false if no field matches.
Parameters
titleThe title of the field to look up.

◆ LookupFloat()

float PixelCrushers.DialogueSystem.Asset.LookupFloat ( string  title)
inline

Looks up the value of a field.

Returns
The float value of the field with the specified title, or 0 if no field matches.
Parameters
titleThe title of the field to look up.

◆ LookupInt()

int PixelCrushers.DialogueSystem.Asset.LookupInt ( string  title)
inline

Looks up the value of a field.

Returns
The int value of the field with the specified title, or 0 if no field matches.
Parameters
titleThe title of the field to look up.

◆ LookupLocalizedValue()

string PixelCrushers.DialogueSystem.Asset.LookupLocalizedValue ( string  title)
inline

Looks up the localized value of a field for the current language.

Returns
The localized value.
Parameters
titleThe title of the field to look up.

◆ LookupValue()

string PixelCrushers.DialogueSystem.Asset.LookupValue ( string  title)
inline

Looks up the value of a field.

Returns
The string value of the field with the specified title, or null if no field matches.
Parameters
titleThe title of the field to look up.

Member Data Documentation

◆ fields

List<Field> PixelCrushers.DialogueSystem.Asset.fields = null

The asset's fields.

An Actor asset may have fields such as Age and IsPlayer, while a DialogueEntry asset may have fields such as Menu Text, Dialogue Text, and Video File.

◆ id

int PixelCrushers.DialogueSystem.Asset.id = 0

Every asset has an ID number.

Internally, the Dialogue System works like Chat Mapper and references assets by ID number.

Property Documentation

◆ Description

string PixelCrushers.DialogueSystem.Asset.Description
getset

Gets or sets the Description field, which is optional and may not exist.

◆ localizedName

string PixelCrushers.DialogueSystem.Asset.localizedName
get

Gets the localized Name field.

The value of the localized Name field.

◆ Name

string PixelCrushers.DialogueSystem.Asset.Name
getset

Gets or sets the Name field.

The value of the asset's Name field.


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