Adventure Creator  1.66.8
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.VarPreset Class Reference

Public Member Functions

 VarPreset (List< GVar > _vars, int[] idArray)
 The default Constructor. More...
 
void UpdateCollection (List< GVar > _vars)
 Ensure the List of PresetValues contains a preset for each supplied variable. More...
 
void UpdateCollection (GVar _var)
 Ensure the List of PresetValues contains a preset for a supplied variable. More...
 
PresetValue GetPresetValue (GVar _var)
 Gets the PresetValue for a specific variable. More...
 
PresetValue GetPresetValue (int variableID)
 Gets the PresetValue for a specific variable. More...
 

Public Attributes

string label
 
int ID
 
List< PresetValuepresetValues = new List<PresetValue>()
 

Detailed Description

A data container of preset variable values.

Constructor & Destructor Documentation

◆ VarPreset()

AC.VarPreset.VarPreset ( List< GVar _vars,
int []  idArray 
)

The default Constructor.

Parameters
_varsA List of variables to create presets for
idArrayAn array of previously-used ID numbers, so that a unique one can be assigned

Member Function Documentation

◆ GetPresetValue() [1/2]

PresetValue AC.VarPreset.GetPresetValue ( GVar  _var)

Gets the PresetValue for a specific variable.

Parameters
_varThe variable to get the PresetValue of

◆ GetPresetValue() [2/2]

PresetValue AC.VarPreset.GetPresetValue ( int  variableID)

Gets the PresetValue for a specific variable.

Parameters
variableIDThe ID number of the variable to get the PresetValue of

◆ UpdateCollection() [1/2]

void AC.VarPreset.UpdateCollection ( List< GVar _vars)

Ensure the List of PresetValues contains a preset for each supplied variable.

Parameters
_varsThe List of variables to create presets for

◆ UpdateCollection() [2/2]

void AC.VarPreset.UpdateCollection ( GVar  _var)

Ensure the List of PresetValues contains a preset for a supplied variable.

Parameters
_varsThe variable to create a preset for

Member Data Documentation

◆ ID

int AC.VarPreset.ID

A unique identifier

◆ label

string AC.VarPreset.label

Its display name

◆ presetValues

List<PresetValue> AC.VarPreset.presetValues = new List<PresetValue>()

A List of PresetValues that match either all global or local variables (see GVar) by ID number