Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | _Update () |
void | _LateUpdate () |
Speech | StartDialog (Char _speaker, string _text, bool isBackground=false, int lineID=-1, bool noAnimation=false, bool preventSkipping=false, AudioClip audioOverride=null, TextAsset lipsyncOverride=null) |
Initialises a new Speech line. More... | |
Speech | StartDialog (Char _speaker, int lineID, bool isBackground=false, bool noAnimation=false) |
Initialises a new Speech line. This differs from the other StartDialog function in that it requires a lineID, which must be present in the Speech Manager and is used to source the line's actual text. More... | |
AudioSource | GetNarratorAudioSource () |
Gets, and creates if necessary, an AudioSource used for Narration speech. If the narratorSound variable is empty, one will be generated and its AudioSource referenced. More... | |
virtual void | PlayScrollAudio (AC.Char _speaker) |
Plays text-scoll audio for a given character. If no character is speaking, narration text-scroll audio will be played instead. More... | |
Speech | GetLatestSpeech (Menu menu=null) |
Gets the last Speech line to be played. More... | |
Speech | GetLiveSpeechWithID (int lineID) |
Gets a speech line with a specific ID, that's currently being spoken More... | |
bool | FoundAudio () |
Checks if any of the active Speech lines have audio. More... | |
bool | IsAnySpeechPlaying (bool ignoreBackgroundSpeech=false) |
Checks if any speech is currently playing. More... | |
string | GetSpeaker (int languageNumber=0) |
Gets the display name of the most recently-speaking character. More... | |
bool | CharacterIsSpeaking (Char _char) |
Checks if a given character is speaking. More... | |
bool | NarrationIsPlaying () |
Checks if narration is currently playing. More... | |
bool | LineIsPlaying (int lineID) |
Checks if a speech line with a given ID is currently playing. More... | |
AC.Char | GetSpeakingCharacter () |
Gets the most recently-speaking character. More... | |
bool | AudioIsPlaying () |
Checks if any of the active Speech lines have audio and are playing it. More... | |
void | KillDialog (bool stopCharacter, bool forceMenusOff, SpeechMenuLimit speechMenuLimit=SpeechMenuLimit.All, SpeechMenuType speechMenuType=SpeechMenuType.All, string limitToCharacters="") |
Kills all active Speech lines. More... | |
void | KillDialog (Speech speech) |
Kills a given Speech line. More... | |
virtual List< LipSyncShape > | GenerateLipSyncShapes (LipSyncMode _lipSyncMode, int lineID, Char _speaker, string language="", string _message="", TextAsset lipsyncOverride=null, AudioClip audioClip=null) |
Generates the animation data for lipsyncing a given Speech line. More... | |
void | EndSpeechByCharacter (Char character) |
Ends speech spoken by a given character More... | |
void | OnInitialiseScene () |
Public Attributes | |
List< Speech > | speechList = new List<Speech>() |
Sound | narratorSound |
float | conversationDelay = 0.3f |
string[] | richTextTags |
Protected Member Functions | |
void | OnEnable () |
void | OnDisable () |
void | OnDestroy () |
void | OnChangeVolume (SoundType soundType, float newVolume) |
void | EndBackgroundSpeechAudio (Speech speech) |
void | EndSpeech (int i, bool stopCharacter=false) |
Protected Attributes | |
AudioSource | defaultAudioSource |
AudioSource | narratorAudioSource |
string[] | speechEventTokenKeys = new string[0] |
Properties | |
string[] | SpeechEventTokenKeys [get, set] |
Manages the creation, updating, and removal of all Speech lines. It should be placed on the GameEngine prefab.
void AC.Dialog._Update | ( | ) |
Updates all active Speech lines. This is called every frame by StateHandler.
bool AC.Dialog.AudioIsPlaying | ( | ) |
bool AC.Dialog.CharacterIsSpeaking | ( | Char | _char | ) |
Checks if a given character is speaking.
<param name = "_char".The character to check
void AC.Dialog.EndSpeechByCharacter | ( | Char | character | ) |
Ends speech spoken by a given character
character | The character to stop speaking |
bool AC.Dialog.FoundAudio | ( | ) |
|
virtual |
Generates the animation data for lipsyncing a given Speech line.
_lipSyncMode | The chosen method of lipsyncing (Off, FromSpeechText, ReadPamelaFile, ReadSapiFile, ReadPapagayoFile, FaceFX, Salsa2D) |
lineID | The speech line's ID number |
_speaker | The speaking character |
language | The name of the current language |
_message | The speech text |
lipsyncOverride | If set, this asset's text will be used for lipsyncing data, instead of the default |
audioClip | If set, shapes generated from speech text will be timed according to the clip's length |
Speech AC.Dialog.GetLiveSpeechWithID | ( | int | lineID | ) |
Gets a speech line with a specific ID, that's currently being spoken
lineID | The ID number of the speech line to get |
AudioSource AC.Dialog.GetNarratorAudioSource | ( | ) |
Gets, and creates if necessary, an AudioSource used for Narration speech. If the narratorSound variable is empty, one will be generated and its AudioSource referenced.
string AC.Dialog.GetSpeaker | ( | int | languageNumber = 0 | ) |
Gets the display name of the most recently-speaking character.
languageNumber | The index number of the language number to get the text in |
AC.Char AC.Dialog.GetSpeakingCharacter | ( | ) |
Gets the most recently-speaking character.
bool AC.Dialog.IsAnySpeechPlaying | ( | bool | ignoreBackgroundSpeech = false | ) |
Checks if any speech is currently playing.
ignoreBackgroundSpeech | If True, then only gameplay-blocking speech will be accounted for |
void AC.Dialog.KillDialog | ( | bool | stopCharacter, |
bool | forceMenusOff, | ||
SpeechMenuLimit | speechMenuLimit = SpeechMenuLimit.All , |
||
SpeechMenuType | speechMenuType = SpeechMenuType.All , |
||
string | limitToCharacters = "" |
||
) |
Kills all active Speech lines.
stopCharacter | If True, then all characters speaking will cease their talking animation |
forceMenusOff | True if subtitles should be turned off immediately |
speechMenuLimit | The type of speech to kill (All, BlockingOnly, BackgroundOnly) |
void AC.Dialog.KillDialog | ( | Speech | speech | ) |
bool AC.Dialog.LineIsPlaying | ( | int | lineID | ) |
Checks if a speech line with a given ID is currently playing.
<param name = "lineID".The line ID to check
bool AC.Dialog.NarrationIsPlaying | ( | ) |
Checks if narration is currently playing.
|
virtual |
Plays text-scoll audio for a given character. If no character is speaking, narration text-scroll audio will be played instead.
_speaker | The speaking character |
Speech AC.Dialog.StartDialog | ( | Char | _speaker, |
int | lineID, | ||
bool | isBackground = false , |
||
bool | noAnimation = false |
||
) |
Initialises a new Speech line. This differs from the other StartDialog function in that it requires a lineID, which must be present in the Speech Manager and is used to source the line's actual text.
_speaker | The speaking character. If null, the line will be treated as narration |
lineID | The ID number of the line, if it is listed in the Speech Manager |
isBackground | True if the line should play in the background, and not interrupt any Actions or gameplay |
noAnimation | True if the character should not play a talking animation |
Speech AC.Dialog.StartDialog | ( | Char | _speaker, |
string | _text, | ||
bool | isBackground = false , |
||
int | lineID = -1 , |
||
bool | noAnimation = false , |
||
bool | preventSkipping = false , |
||
AudioClip | audioOverride = null , |
||
TextAsset | lipsyncOverride = null |
||
) |
Initialises a new Speech line.
_speaker | The speaking character. If null, the line will be treated as narration |
_text | The subtitle text to display |
isBackground | True if the line should play in the background, and not interrupt any Actions or gameplay |
lineID | The ID number of the line, if it is listed in the Speech Manager |
noAnimation | True if the character should not play a talking animation |
preventSkipping | True if the speech cannot be skipped regardless of subtitle settings in the Speech Manager |
audioOverride | If set, then this audio will be played instead of the one assigned via the Speech Manager given the line ID and language |
lipsyncOverride | If set, then this lipsync text asset will be played instead of the one assigned via the Speech Manager given the line ID and language |
float AC.Dialog.conversationDelay = 0.3f |
The delay in seconds between choosing a Conversation's dialogue option and it triggering
string [] AC.Dialog.richTextTags |
An array of rich-text tag names that can be detected when scrolling speech, to prevent them from displaying incorrectly. If a name ends with an '=' symbol, the tag has a parameter
|
getset |
An array of string keys that can be inserted into speech text in the form [key:value]. When processed by the speech display, they will be removed from the speech, but will trigger the OnSpeechToken and OnRequestSpeechTokenReplacement events.