Adventure Creator  1.55b
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2016
AC.GlobalVariables Class Reference
Inheritance diagram for AC.GlobalVariables:

Static Public Member Functions

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

Detailed Description

A class that can manipulate and retrieve the game's Global Variables at runtime.

Member Function Documentation

static void AC.GlobalVariables.BackupAll ( )
static

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

static void AC.GlobalVariables.DownloadAll ( )
static

Downloads the values of all linked variables from their linked counterparts.

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

Returns a list of all global variables.

Returns
A List of GVar variables
static bool AC.GlobalVariables.GetBooleanValue ( int  _id,
bool  synchronise = true 
)
static

Returns the value of a global Boolean variable.

Parameters
_idThe ID number of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
Returns
The bool value of the variable
static float AC.GlobalVariables.GetFloatValue ( int  _id,
bool  synchronise = true 
)
static

Returns the value of a global Float variable.

Parameters
_idThe ID number of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
Returns
The float value of the variable
static int AC.GlobalVariables.GetIntegerValue ( int  _id,
bool  synchronise = true 
)
static

Returns the value of a global Integer variable.

Parameters
_idThe ID number of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
Returns
The integer value of the variable
static string AC.GlobalVariables.GetPopupValue ( int  _id,
bool  synchronise = true,
int  languageNumber = 0 
)
static

Returns the value of a global Popup variable.

Parameters
_idThe ID number of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
languageNumberThe index number of the game's current language
Returns
The string value of the variable
static string AC.GlobalVariables.GetStringValue ( int  _id,
bool  synchronise = true,
int  languageNumber = 0 
)
static

Returns the value of a global String variable.

Parameters
_idThe ID number of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
languageNumberThe index number of the game's current language
Returns
The string value of the variable
static GVar AC.GlobalVariables.GetVariable ( int  _id)
static

Returns a global variable.

Parameters
_idThe ID number of the variable
static void AC.GlobalVariables.SetBooleanValue ( int  _id,
bool  _value,
bool  synchronise = true 
)
static

Sets the value of a global Boolean variable.

Parameters
_idThe ID number of the variable
_valueThe new bool value of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
static void AC.GlobalVariables.SetFloatValue ( int  _id,
float  _value,
bool  synchronise = true 
)
static

Sets the value of a global Float variable.

Parameters
_idThe ID number of the variable
_valueThe new float value of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
static void AC.GlobalVariables.SetIntegerValue ( int  _id,
int  _value,
bool  synchronise = true 
)
static

Sets the value of a global Integer variable.

Parameters
_idThe ID number of the variable
_valueThe new integer value of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
static void AC.GlobalVariables.SetPopupValue ( int  _id,
int  _value,
bool  synchronise = true 
)
static

Sets the value of a global PopUp variable.

Parameters
_idThe ID number of the variable
_valueThe new index value of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
static void AC.GlobalVariables.SetStringValue ( int  _id,
string  _value,
bool  synchronise = true 
)
static

Sets the value of a global String variable.

Parameters
_idThe ID number of the variable
_valueThe new string value of the variable
synchroniseIf True, then the variable's value will be synchronised with any external link it may have.
static void AC.GlobalVariables.UploadAll ( )
static

Uploads the values all linked variables to their linked counterparts.