Adventure Creator  1.57
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2017
AC.LocalVariables Class Reference
Inheritance diagram for AC.LocalVariables:

Public Member Functions

void BackupAllValues ()
 
void AssignFromPreset (VarPreset varPreset)
 Assigns all Local Variables to preset values. More...
 
void AssignFromPreset (int varPresetID)
 Assigns all Local Variables to preset values. More...
 
VarPreset GetPreset (int varPresetID)
 Gets a Local Variable preset with a specific ID number. More...
 

Static Public Member Functions

static GVar GetVariable (int _id, LocalVariables localVariables=null)
 Returns a local variable. More...
 
static List< GVarGetAllVars ()
 Returns a list of all local variables. More...
 
static int GetIntegerValue (int _id)
 Returns the value of a local Integer variable. More...
 
static bool GetBooleanValue (int _id)
 Returns the value of a local Boolean variable. More...
 
static string GetStringValue (int _id, int lanugageNumber=0)
 Returns the value of a local String variable. More...
 
static float GetFloatValue (int _id)
 Returns the value of a local Float variable. More...
 
static string GetPopupValue (int _id, int languageNumber=0)
 Returns the value of a local Popup variable. More...
 
static void SetIntegerValue (int _id, int _value)
 Sets the value of a local Integer variable. More...
 
static void SetBooleanValue (int _id, bool _value)
 Sets the value of a local Boolean variable. More...
 
static void SetStringValue (int _id, string _value)
 Sets the value of a local String variable. More...
 
static void SetFloatValue (int _id, float _value)
 Sets the value of a local Float variable. More...
 
static void SetPopupValue (int _id, int _value)
 Sets the value of a local PopUp variable. More...
 

Public Attributes

List< GVarlocalVars = new List<GVar>()
 
List< VarPresetvarPresets = new List<VarPreset>()
 

Detailed Description

Stores a scene's local variables. This component should be attached to the GameEngine prefab.

Member Function Documentation

void AC.LocalVariables.AssignFromPreset ( VarPreset  varPreset)

Assigns all Local Variables to preset values.

Parameters
varPresetThe VarPreset that contains the preset values
void AC.LocalVariables.AssignFromPreset ( int  varPresetID)

Assigns all Local Variables to preset values.

Parameters
varPresetIDThe ID number of the VarPreset that contains the preset values
void AC.LocalVariables.BackupAllValues ( )

Backs up the values of all local variables. Necessary when skipping ActionLists that involve checking variable values.

static List<GVar> AC.LocalVariables.GetAllVars ( )
static

Returns a list of all local variables.

Returns
A List of GVar variables
static bool AC.LocalVariables.GetBooleanValue ( int  _id)
static

Returns the value of a local Boolean variable.

Parameters
_idThe ID number of the variable
Returns
The boolean value of the variable
static float AC.LocalVariables.GetFloatValue ( int  _id)
static

Returns the value of a local Float variable.

Parameters
_idThe ID number of the variable
Returns
The float value of the variable
static int AC.LocalVariables.GetIntegerValue ( int  _id)
static

Returns the value of a local Integer variable.

Parameters
_idThe ID number of the variable
Returns
The integer value of the variable
static string AC.LocalVariables.GetPopupValue ( int  _id,
int  languageNumber = 0 
)
static

Returns the value of a local Popup variable.

Parameters
_idThe ID number of the variable
languageNumberThe index number of the game's current language
Returns
The string value of the variable
VarPreset AC.LocalVariables.GetPreset ( int  varPresetID)

Gets a Local Variable preset with a specific ID number.

Parameters
varPresetIDThe ID number of the VarPreset
Returns
The Local Variable preset
static string AC.LocalVariables.GetStringValue ( int  _id,
int  lanugageNumber = 0 
)
static

Returns the value of a local String variable.

Parameters
_idThe ID number of the variable
languageNumberThe index number of the game's current language
Returns
The string value of the variable
static GVar AC.LocalVariables.GetVariable ( int  _id,
LocalVariables  localVariables = null 
)
static

Returns a local variable.

Parameters
_idThe ID number of the variable
localVariablesThe LocalVariables script to read from, if not the active scene's GameEngine
static void AC.LocalVariables.SetBooleanValue ( int  _id,
bool  _value 
)
static

Sets the value of a local Boolean variable.

Parameters
_idThe ID number of the variable
_valueThe new bool value of the variable
static void AC.LocalVariables.SetFloatValue ( int  _id,
float  _value 
)
static

Sets the value of a local Float variable.

Parameters
_idThe ID number of the variable
_valueThe new float value of the variable
static void AC.LocalVariables.SetIntegerValue ( int  _id,
int  _value 
)
static

Sets the value of a local Integer variable.

Parameters
_idThe ID number of the variable
_valueThe new integer value of the variable
static void AC.LocalVariables.SetPopupValue ( int  _id,
int  _value 
)
static

Sets the value of a local PopUp variable.

Parameters
_idThe ID number of the variable
_valueThe new index value of the variable
static void AC.LocalVariables.SetStringValue ( int  _id,
string  _value 
)
static

Sets the value of a local String variable.

_id">The ID number of the variable</param> <param>_value">The new string value of the variable

Member Data Documentation

List<GVar> AC.LocalVariables.localVars = new List<GVar>()

The List of local variables in the scene.

List<VarPreset> AC.LocalVariables.varPresets = new List<VarPreset>()

A List of preset values that the variables can be bulk-assigned to