![]() |
Adventure Creator
1.78.0
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | OnInitGameEngine () |
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... | |
string | GetTranslatableString (int index) |
Gets the text to be translated, given its index. More... | |
int | GetTranslationID (int index) |
Gets the translation ID of a given text index. More... | |
void | UpdateTranslatableString (int index, string updatedText) |
int | GetNumTranslatables () |
Gets the maximum number of possible translatable texts. More... | |
bool | HasExistingTranslation (int index) |
Checks if a given text index has already been assigned a unique translation ID. More... | |
void | SetTranslationID (int index, int _lineID) |
Sets the translation ID of a given text index More... | |
string | GetOwner (int index) |
Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element. More... | |
bool | OwnerIsPlayer (int index) |
Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line. More... | |
AC_TextType | GetTranslationType (int index) |
Gets the translation type of a given text index. More... | |
bool | CanTranslate (int index) |
Checks if a given text index can and should be translated. More... | |
Static Public Member Functions | |
static GVar | GetVariable (int _id, LocalVariables localVariables=null) |
Returns a local variable. More... | |
static GVar | GetVariable (string _name, LocalVariables localVariables=null) |
Returns a local variable. More... | |
static List< GVar > | GetAllVars () |
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 Vector3 | GetVector3Value (int _id) |
Returns the value of a local Vector3 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 | SetVector3Value (int _id, Vector3 _value) |
Sets the value of a local Vector3 variable. More... | |
static void | SetPopupValue (int _id, int _value) |
Sets the value of a local PopUp variable. More... | |
Public Attributes | |
List< GVar > | localVars = new List<GVar>() |
List< VarPreset > | varPresets = new List<VarPreset>() |
Stores a scene's local variables. This component should be attached to the GameEngine prefab.
void AC.LocalVariables.AssignFromPreset | ( | int | varPresetID | ) |
void AC.LocalVariables.AssignFromPreset | ( | VarPreset | varPreset | ) |
void AC.LocalVariables.BackupAllValues | ( | ) |
Backs up the values of all local variables. Necessary when skipping ActionLists that involve checking variable values.
bool AC.LocalVariables.CanTranslate | ( | int | index | ) |
Checks if a given text index can and should be translated.
index | The index of the translatable text |
Implements AC.ITranslatable.
|
static |
Returns a list of all local variables.
|
static |
Returns the value of a local Boolean variable.
_id | The ID number of the variable |
|
static |
Returns the value of a local Float variable.
_id | The ID number of the variable |
|
static |
Returns the value of a local Integer variable.
_id | The ID number of the variable |
int AC.LocalVariables.GetNumTranslatables | ( | ) |
Gets the maximum number of possible translatable texts.
Implements AC.ITranslatable.
string AC.LocalVariables.GetOwner | ( | int | index | ) |
Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element.
index | The index of the translatable text |
Implements AC.ITranslatable.
|
static |
Returns the value of a local Popup variable.
_id | The ID number of the variable |
languageNumber | The index number of the game's current language |
VarPreset AC.LocalVariables.GetPreset | ( | int | varPresetID | ) |
Gets a Local Variable preset with a specific ID number.
varPresetID | The ID number of the VarPreset |
|
static |
Returns the value of a local String variable.
_id | The ID number of the variable |
languageNumber | The index number of the game's current language |
string AC.LocalVariables.GetTranslatableString | ( | int | index | ) |
Gets the text to be translated, given its index.
index | The index of the translatable text |
Implements AC.ITranslatable.
int AC.LocalVariables.GetTranslationID | ( | int | index | ) |
Gets the translation ID of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
AC_TextType AC.LocalVariables.GetTranslationType | ( | int | index | ) |
Gets the translation type of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
|
static |
Returns a local variable.
_id | The ID number of the variable |
localVariables | The LocalVariables script to read from, if not the active scene's GameEngine |
|
static |
Returns a local variable.
_name | The name of the variable |
localVariables | The LocalVariables script to read from, if not the active scene's GameEngine |
|
static |
Returns the value of a local Vector3 variable.
_id | The ID number of the variable |
bool AC.LocalVariables.HasExistingTranslation | ( | int | index | ) |
Checks if a given text index has already been assigned a unique translation ID.
index | The index of the translatable text |
Implements AC.ITranslatable.
void AC.LocalVariables.OnInitGameEngine | ( | ) |
Creates run-time translations of local variables.
bool AC.LocalVariables.OwnerIsPlayer | ( | int | index | ) |
Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line.
index | The index of the translatable text |
Implements AC.ITranslatable.
|
static |
Sets the value of a local Boolean variable.
_id | The ID number of the variable |
_value | The new bool value of the variable |
|
static |
Sets the value of a local Float variable.
_id | The ID number of the variable |
_value | The new float value of the variable |
|
static |
Sets the value of a local Integer variable.
_id | The ID number of the variable |
_value | The new integer value of the variable |
|
static |
Sets the value of a local PopUp variable.
_id | The ID number of the variable |
_value | The new index value of the variable |
|
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
void AC.LocalVariables.SetTranslationID | ( | int | index, |
int | lineID | ||
) |
Sets the translation ID of a given text index
index | The index of the translatable text |
lineID | The new translation ID to assign the translatable text |
Implements AC.ITranslatable.
|
static |
Sets the value of a local Vector3 variable.
_id | The ID number of the variable |
_value | The new Vector3 value of the variable |