PixelCrushers.DialogueSystem.Variable Class Reference

A user variable asset. More...

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

Public Member Functions

 Variable ()
 Initializes a new Variable.
 
 Variable (Variable sourceVariable)
 Copy constructor.
 
 Variable (ChatMapper.UserVariable chatMapperUserVariable)
 Initializes a new Variable copied from a Chat Mapper user variable.
 
void Assign (ChatMapper.UserVariable chatMapperUserVariable)
 Copies a Chat Mapper user variable asset.
 
- 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.
 

Properties

string InitialValue [get, set]
 Gets or sets the initial string value of a dialogue variable.
 
float InitialFloatValue [get, set]
 Gets or sets the initial float value of a dialogue variable.
 
bool InitialBoolValue [get, set]
 Gets or sets the initial bool value of a dialogue variable.
 
FieldType Type [get, set]
 Gets the data type of the variable based on the data type of its initial value.
 
- 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.
 

Additional Inherited Members

- Public Attributes inherited from PixelCrushers.DialogueSystem.Asset
int id = 0
 Every asset has an ID number.
 
List< Fieldfields = null
 The asset's fields.
 

Detailed Description

A user variable asset.

Chat Mapper allows you to define your own user variables that you reference in dialogue entry conditions and user scripts. This class represents those user variables in the dialogue system. As with Chat Mapper projects, a dialogue database contains a table of user variables (named "Variable[]") that you can access in Lua.

Constructor & Destructor Documentation

◆ Variable() [1/3]

PixelCrushers.DialogueSystem.Variable.Variable ( )
inline

Initializes a new Variable.

◆ Variable() [2/3]

PixelCrushers.DialogueSystem.Variable.Variable ( Variable  sourceVariable)
inline

Copy constructor.

Parameters
sourceVariableSource variable.

◆ Variable() [3/3]

PixelCrushers.DialogueSystem.Variable.Variable ( ChatMapper::UserVariable  chatMapperUserVariable)
inline

Initializes a new Variable copied from a Chat Mapper user variable.

Parameters
chatMapperUserVariableThe Chat Mapper user variable.

Member Function Documentation

◆ Assign()

void PixelCrushers.DialogueSystem.Variable.Assign ( ChatMapper::UserVariable  chatMapperUserVariable)
inline

Copies a Chat Mapper user variable asset.

Parameters
chatMapperUserVariableThe Chat Mapper user variable.

Property Documentation

◆ InitialBoolValue

bool PixelCrushers.DialogueSystem.Variable.InitialBoolValue
getset

Gets or sets the initial bool value of a dialogue variable.

Use this when the data type is FieldType.Boolean.

The initial bool value.

◆ InitialFloatValue

float PixelCrushers.DialogueSystem.Variable.InitialFloatValue
getset

Gets or sets the initial float value of a dialogue variable.

Use this when the data type is FieldType.Number.

The initial float value.

◆ InitialValue

string PixelCrushers.DialogueSystem.Variable.InitialValue
getset

Gets or sets the initial string value of a dialogue variable.

The initial value.

◆ Type

FieldType PixelCrushers.DialogueSystem.Variable.Type
getset

Gets the data type of the variable based on the data type of its initial value.

The type.


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