Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | OnInitPersistentEngine () |
virtual void | LoadAssetBundle (int language) |
Loads in audio and lipsync AssetBundles for a given language More... | |
virtual AudioClip | GetSpeechAudioClip (int lineID, Char _speaker) |
Gets the AudioClip associated with a speech line More... | |
virtual T | GetSpeechLipsyncFile< T > (int lineID, Char _speaker) |
Gets the lipsync file associated with a speech line More... | |
string | GetTranslation (int lineID) |
Gets the translation of a line of text, based on the game's current language. More... | |
string | GetTranslation (string originalText, int _lineID, int language) |
Gets the translation of a line of text. More... | |
string | GetTranslation (string originalText, int _lineID, int language, AC_TextType textType) |
Gets the translation of a line of text. More... | |
SpeechLine | GetSpeechLine (string originalText, int _lineID, int language, AC_TextType textType) |
Gets the translation data for a line of text. More... | |
string | GetCurrentLanguageText (int _lineID) |
Gets a line of text, translated (if applicable) to the current language. More... | |
string[] | GetTranslations (int _lineID) |
Gets all translations of a line of text. More... | |
void | UpdateRuntimeTranslation (int lineID, int languageIndex, string translationText) |
Updates the translation of a given line for a given language. More... | |
string | GetTranslatableText (ITranslatable translatable, int index=0) |
Gets the text of an ITranslatable instance, based on the game's current language. More... | |
void | ImportRuntimeTranslation (TextAsset textAsset, string languageName, int newTextColumn, bool ignoreEmptyCells=false, bool isRTL=false) |
Imports a translation CSV file (as generated by the Speech Manager) into the game - either as a new language, or as an update to an existing one. The first column MUST be the ID number of each line, and the first row must be for the header. More... | |
bool | LanguageReadsRightToLeft (int languageIndex) |
Checks if a given language reads right-to-left, Hebrew/Arabic-style More... | |
bool | LanguageReadsRightToLeft (string languageName) |
Checks if a given language reads right-to-left, Hebrew/Arabic-style More... | |
bool | MarkLineAsSpoken (int lineID) |
Marks a speech line as having been spoken, so that it cannot be spoken again. This will only work for speech lines that have 'Can only play once?' checked in their Speech Manager entry. More... | |
MainData | SaveMainData (MainData mainData) |
Updates a MainData class with its own variables that need saving. More... | |
void | LoadMainData (MainData mainData) |
Updates its own variables from a MainData class. More... | |
int | TrueLanguageIndexToEnabledIndex (int trueIndex) |
int | GetEnabledLanguageIndex (int trueIndex) |
int | EnabledLanguageToTrueIndex (int enabledIndex) |
int | GetNumEnabledLanguages () |
Protected Attributes | |
Dictionary< int, SpeechLine > | speechLinesDictionary = null |
List< Language > | languages = new List<Language>() |
AssetBundle | currentAudioAssetBundle = null |
string | currentAudioAssetBundleName |
AssetBundle | currentLipsyncAssetBundle = null |
string | currentLipsyncAssetBundleName |
bool | isLoadingBundle |
List< int > | spokenOnceSpeechLineIDs = new List<int>() |
Properties | |
AssetBundle | CurrentAudioAssetBundle [get, set] |
AssetBundle | CurrentLipsyncAssetBundle [get, set] |
List< Language > | Languages [get] |
bool | IsLoadingBundle [get] |
This script contains all language data for the game at runtime. It transfers data from the Speech Manaager to itself when the game begins.
string AC.RuntimeLanguages.GetCurrentLanguageText | ( | int | _lineID | ) |
Gets a line of text, translated (if applicable) to the current language.
_lineID | The translation ID number generated by SpeechManager's PopulateList() function |
|
virtual |
Gets the AudioClip associated with a speech line
lineID | The ID number of the speech line, as generated by the Speech Manager |
_speaker | The character speaking the line |
SpeechLine AC.RuntimeLanguages.GetSpeechLine | ( | string | originalText, |
int | _lineID, | ||
int | language, | ||
AC_TextType | textType | ||
) |
Gets the translation data for a line of text.
originalText | The line in its original language. |
_lineID | The translation ID number generated by SpeechManager's PopulateList() function |
language | The index number of the language to return the line in, where 0 = the game's original language. |
textType | The type of text to translatable. |
|
virtual |
Gets the lipsync file associated with a speech line
lineID | The ID number of the speech line, as generated by the Speech Manager |
_speaker | The character speaking the line |
T | : | Object |
string AC.RuntimeLanguages.GetTranslatableText | ( | ITranslatable | translatable, |
int | index = 0 |
||
) |
Gets the text of an ITranslatable instance, based on the game's current language.
translatable | The ITranslatable instance. |
index | The index of the ITranslatable's array of translatable text |
string AC.RuntimeLanguages.GetTranslation | ( | int | lineID | ) |
Gets the translation of a line of text, based on the game's current language.
lineID | The ITranslatable instance's line ID. |
string AC.RuntimeLanguages.GetTranslation | ( | string | originalText, |
int | _lineID, | ||
int | language | ||
) |
Gets the translation of a line of text.
originalText | The line in its original language. |
_lineID | The translation ID number generated by SpeechManager's PopulateList() function |
language | The index number of the language to return the line in, where 0 = the game's original language. |
string AC.RuntimeLanguages.GetTranslation | ( | string | originalText, |
int | _lineID, | ||
int | language, | ||
AC_TextType | textType | ||
) |
Gets the translation of a line of text.
originalText | The line in its original language. |
_lineID | The translation ID number generated by SpeechManager's PopulateList() function |
language | The index number of the language to return the line in, where 0 = the game's original language. |
textType | The type of text to translatable. |
string [] AC.RuntimeLanguages.GetTranslations | ( | int | _lineID | ) |
Gets all translations of a line of text.
_lineID | The translation ID number generated by SpeechManager's PopulateList() function |
void AC.RuntimeLanguages.ImportRuntimeTranslation | ( | TextAsset | textAsset, |
string | languageName, | ||
int | newTextColumn, | ||
bool | ignoreEmptyCells = false , |
||
bool | isRTL = false |
||
) |
Imports a translation CSV file (as generated by the Speech Manager) into the game - either as a new language, or as an update to an existing one. The first column MUST be the ID number of each line, and the first row must be for the header.
textAsset | The CSV file as a text asset. |
languageName | The name of the language. If a language by this name already exists in the system, the import process will update it. |
newTextColumn | The column number (starting from zero) that holds the new translation. This must be greater than zero, as the first column should be occupied by the ID numbers. |
ignoreEmptyCells | If True, then empty cells will not be imported and the original language will be used instead |
isRTL | If True, the language is read right-to-left |
bool AC.RuntimeLanguages.LanguageReadsRightToLeft | ( | int | languageIndex | ) |
Checks if a given language reads right-to-left, Hebrew/Arabic-style
languageIndex | The index number of the language to check, where 0 is the game's original language |
bool AC.RuntimeLanguages.LanguageReadsRightToLeft | ( | string | languageName | ) |
Checks if a given language reads right-to-left, Hebrew/Arabic-style
languageName | The name of the language to check, as written in the Speech Manager |
|
virtual |
Loads in audio and lipsync AssetBundles for a given language
language | The index number of the language to load AssetBundles for |
void AC.RuntimeLanguages.LoadMainData | ( | MainData | mainData | ) |
bool AC.RuntimeLanguages.MarkLineAsSpoken | ( | int | lineID | ) |
Marks a speech line as having been spoken, so that it cannot be spoken again. This will only work for speech lines that have 'Can only play once?' checked in their Speech Manager entry.
lineID | The line being spoken |
void AC.RuntimeLanguages.UpdateRuntimeTranslation | ( | int | lineID, |
int | languageIndex, | ||
string | translationText | ||
) |
Updates the translation of a given line for a given language.
lineID | The ID of the text to update, as generated by the Speech Manager |
languageIndex | The index number of the language to update. Must be greater than 0, since 0 is the game's original language |
translationText | The updated translation text |
|
getset |
The AssetBundle to retrieve audio files from
|
getset |
The AssetBundle to retrieve lipsync files from
|
get |
True if an audio or lipsync asset bundle is currently being loaded into memory
|
get |
The game's languages. The first is always "Original".