Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | OnInitPersistentEngine () |
bool | SwitchProfile (int index, bool includeActive) |
Switches to a specific profile, provided that it exists. More... | |
int | ProfileIndexToID (int index, bool includeActive=true) |
Converts a profile's index in a MenuProfilesList element to an ID number. More... | |
int | CreateProfile (string _label="") |
Creates a new profile (instance of OptionsData). More... | |
void | RenameProfile (string newProfileLabel, int profileIndex=-2, bool includeActive=true) |
Renames a profile by referencing its entry in a MenuProfilesList element. More... | |
void | RenameProfileID (string newProfileLabel, int profileID) |
Renames a profile ID. More... | |
string | GetProfileName (int index=-1, bool includeActive=true) |
Gets the name of a specific profile. More... | |
string | GetProfileIDName (int profileID) |
Gets the name of a specific profile ID. More... | |
int | GetNumProfiles () |
Gets the number of profiles associated with the game. More... | |
bool | DoesProfileExist (int index, bool includeActive=true) |
Checks if a profile exists. More... | |
bool | DoesProfileExist (string label) |
Checks if a profile with a specific name exists More... | |
void | OnInitialiseScene () |
void | SetVolume (SoundType _soundType, float newVolume=-1f) |
Updates the volume of all Sound object of a specific SoundType to their correct values. More... | |
Static Public Member Functions | |
static void | SaveDefaultPrefs (OptionsData defaultOptionsData) |
Saves the default options data (i.e. the values chosen in SettingsManager) to the default profile. More... | |
static OptionsData | LoadDefaultPrefs () |
Loads the OptionsData from the default profile. More... | |
static void | DeleteDefaultProfile () |
static void | SavePrefs (bool updateVariables=true) |
Saves the current options to the active profile. More... | |
static void | SavePrefsToID (int ID, OptionsData _optionsData=null, bool showLog=false) |
Saves specific options to a specific profile. More... | |
static void | LoadPrefs () |
static OptionsData | LoadPrefsFromID (int profileID, bool showLog=false, bool doSave=true) |
Gets the options values associated with a specific profile. More... | |
static void | DrawStatus () |
static int | GetActiveProfileID () |
Gets the ID number of the active profile. More... | |
static void | SetActiveProfileID (int profileID) |
Sets the ID number of the active profile. More... | |
static void | DeleteProfilePrefs (int profileID) |
Deletes the PlayerPrefs key associated with a specfic profile More... | |
static bool | DoesProfileIDExist (int profileID) |
Checks if a specific profile ID exists. More... | |
static bool | SwitchProfileID (int profileID) |
Switches to a specific profile ID, provided that it exists. More... | |
static void | UpdateSaveLabels (SaveFile[] foundSaveFiles) |
Updates the labels of all save files by storing them in the profile's OptionsData. More... | |
static void | SetLanguage (int i) |
Changes the currently-selected language. If voice and text languages are synced (which is the default), then both will be updated More... | |
static void | SetVoiceLanguage (int i) |
Changes the currently-selected voice language. If voice and text languages are synced, the text language will be set to this as well. More... | |
static void | SetSubtitles (bool showSubtitles) |
Changes the subtitle display setting. More... | |
static void | SetSFXVolume (float newVolume) |
Sets the value of the 'SFX volume'. More... | |
static void | SetSpeechVolume (float newVolume) |
Sets the value of the 'Speech volume'. More... | |
static void | SetMusicVolume (float newVolume) |
Sets the value of the 'Music volume'. More... | |
static string | GetLanguageName () |
Gets the name of the currently-selected language. More... | |
static string | GetVoiceLanguageName () |
Gets the name of the currently-selected voice language. More... | |
static int | GetLanguage () |
Gets the index number of the currently-selected language. More... | |
static int | GetVoiceLanguage () |
Gets the index number of the currently-selected voice language. More... | |
static bool | AreSubtitlesOn () |
Checks if subtitles are enabled More... | |
static float | GetSFXVolume () |
Gets the current value of the 'SFX volume'. More... | |
static float | GetMusicVolume () |
Gets the current value of the 'Music volume'. More... | |
static float | GetSpeechVolume () |
Gets the current value of the 'Speech volume'. More... | |
static GVar | GetProfileVariable (int profileID, int variableID) |
Gets the variable associated with a specific profile More... | |
Static Public Attributes | |
static OptionsData | optionsData |
const int | maxProfiles = 50 |
Protected Member Functions | |
int | FindFirstEmptyProfileID () |
IEnumerator | UpdateMixerVolumes () |
Static Protected Attributes | |
static iOptionsFileHandler | optionsFileHandlerOverride |
Properties | |
static iOptionsFileHandler | OptionsFileHandler [get, set] |
Stores the local instances of OptionsData, and provides functions for saving and loading options and profiles to and from the PlayerPrefs.
|
static |
Checks if subtitles are enabled
int AC.Options.CreateProfile | ( | string | _label = "" | ) |
Creates a new profile (instance of OptionsData).
_label | The name of the new profile. |
|
static |
Deletes the default profile.
|
static |
Deletes the PlayerPrefs key associated with a specfic profile
profileID | The unique identifier of the profile to delete |
bool AC.Options.DoesProfileExist | ( | int | index, |
bool | includeActive = true |
||
) |
Checks if a profile exists.
index | The index in the MenuProfilesList element that represents the profile to search for. |
includeActive | If True, then the MenuProfilesList element that the profile was selected from also displays the active profile |
bool AC.Options.DoesProfileExist | ( | string | label | ) |
Checks if a profile with a specific name exists
label | The name of the profile to check for |
|
static |
Checks if a specific profile ID exists.
profileID | The profile ID to check for |
|
static |
Displays Options-related information for the AC Status window
|
static |
Gets the ID number of the active profile.
|
static |
Gets the index number of the currently-selected language.
|
static |
Gets the name of the currently-selected language.
|
static |
Gets the current value of the 'Music volume'.
int AC.Options.GetNumProfiles | ( | ) |
Gets the number of profiles associated with the game.
string AC.Options.GetProfileIDName | ( | int | profileID | ) |
Gets the name of a specific profile ID.
profileID | The profile ID to get the name of |
string AC.Options.GetProfileName | ( | int | index = -1 , |
bool | includeActive = true |
||
) |
Gets the name of a specific profile.
index | The index in the MenuProfilesList element that represents the profile to get the name of. |
includeActive | If True, then the MenuProfilesList element that the profile was selected from also displays the active profile |
|
static |
Gets the variable associated with a specific profile
profileID | The ID of the profile |
variableID | The ID of the Global variable |
|
static |
Gets the current value of the 'SFX volume'.
|
static |
Gets the current value of the 'Speech volume'.
|
static |
Gets the index number of the currently-selected voice language.
|
static |
Gets the name of the currently-selected voice language.
|
static |
Loads the OptionsData from the default profile.
|
static |
Sets the options values to those stored within the active profile.
|
static |
Gets the options values associated with a specific profile.
profileID | A unique identifier for the profile to save to |
showLog | If True, the details of this save will be printed in the Console window |
doSave | If True, and if the profile had no OptionsData to read, then new values will be saved to it |
int AC.Options.ProfileIndexToID | ( | int | index, |
bool | includeActive = true |
||
) |
Converts a profile's index in a MenuProfilesList element to an ID number.
index | The index of profiles in a MenuProfilesList element that represents the profile to switch to |
includeActive | If True, then the MenuProfilesList element that contains the profile to switch to also lists the active profile |
void AC.Options.RenameProfile | ( | string | newProfileLabel, |
int | profileIndex = -2 , |
||
bool | includeActive = true |
||
) |
Renames a profile by referencing its entry in a MenuProfilesList element.
newProfileLabel | The new label for the profile |
profileIndex | The index in the MenuProfilesList element that represents the profile to rename. If it is set to its default, -2, the active profile will be renamed |
includeActive | If True, then the MenuProfilesList element that the profile was selected from also displays the active profile |
void AC.Options.RenameProfileID | ( | string | newProfileLabel, |
int | profileID | ||
) |
Renames a profile ID.
newProfileLabel | The new label for the profile |
profileID | The profile ID to rename |
|
static |
Saves the default options data (i.e. the values chosen in SettingsManager) to the default profile.
defaultOptionsData | An instance of OptionsData that represents default values |
|
static |
Saves the current options to the active profile.
updateVariables | If True, then the values of variables linked to options data will be updated in the options data |
|
static |
Saves specific options to a specific profile.
ID | A unique identifier for the profile to save to |
_optionsData | An instance of OptionsData containing the options to save |
showLog | If True, the details of this save will be printed in the Console window |
|
static |
Sets the ID number of the active profile.
profileID | A unique identifier for the profile |
|
static |
Changes the currently-selected language. If voice and text languages are synced (which is the default), then both will be updated
i | The language's index number in SpeechManager |
|
static |
|
static |
Sets the value of the 'SFX volume'.
newVolume | The new value of the 'SFX volume' |
|
static |
|
static |
Changes the subtitle display setting.
showSubtitles | If True, subtitles will be shown |
|
static |
Changes the currently-selected voice language. If voice and text languages are synced, the text language will be set to this as well.
i | The language's index number in SpeechManager |
void AC.Options.SetVolume | ( | SoundType | _soundType, |
float | newVolume = -1f |
||
) |
Updates the volume of all Sound object of a specific SoundType to their correct values.
_soundType | The SoundType that matches the Sound objects to update (Music, SFX, Other) |
newVolume | If >= 0, the OptionsData will be updated as well |
bool AC.Options.SwitchProfile | ( | int | index, |
bool | includeActive | ||
) |
Switches to a specific profile, provided that it exists.
index | The index of profiles in a MenuProfilesList element that represents the profile to switch to |
includeActive | If True, then the MenuProfilesList element that contains the profile to switch to also lists the active profile |
|
static |
Switches to a specific profile ID, provided that it exists.
profileID | The unique identifier of the profile to switch to |
|
static |
Updates the labels of all save files by storing them in the profile's OptionsData.
foundSaveFiles | An array of SaveFile instances, that represent the found save game files found on disk |
|
static |
The maximum number of profiles that can be created
|
static |
A local copy of the currently-active profile
|
staticgetset |
The iOptionsFileHandler class that handles the creation, loading, and deletion of save files