PixelCrushers.DialogueSystem.Asset Class Reference

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

Inheritance diagram for PixelCrushers.DialogueSystem.Asset:

Public Member Functions

 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

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

Properties

string Name [get, set]
 Gets or sets the Name field. More...
 
string LocalizedName [get]
 Gets the localized Name field. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Asset() [1/3]

PixelCrushers.DialogueSystem.Asset.Asset ( )

Initializes a new DialogueAsset.

◆ Asset() [2/3]

PixelCrushers.DialogueSystem.Asset.Asset ( Asset  sourceAsset)

Copy constructor.

Parameters
sourceAssetSource asset.

◆ Asset() [3/3]

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

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 
)

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)

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)

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)

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)

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)

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)

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)

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)

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

◆ 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: