This is an abstract base typewriter class. More...
Public Member Functions | |
virtual float | GetSpeed () |
Returns the typewriter's charactersPerSecond. | |
virtual void | SetSpeed (float charactersPerSecond) |
Sets the typewriter's charactersPerSecond. | |
virtual void | Awake () |
void | Start () |
virtual void | OnEnable () |
virtual void | OnDisable () |
virtual void | StopOnConversationEnd (Transform actor) |
void | Stop () |
void | StartTyping (string text, int fromIndex=0) |
void | StopTyping () |
virtual void | StopCharacterAudio () |
Static Public Member Functions | |
static string | StripRPGMakerCodes (string s) |
Public Attributes | |
bool | rightToLeft = false |
Set true to type right to left. | |
float | charactersPerSecond = 50 |
How fast to "type.". | |
AudioClip | audioClip = null |
The audio clip to play with each character. | |
AudioClip[] | alternateAudioClips = new AudioClip[0] |
If specified, randomly use these clips or the main Audio Clip. | |
AudioSource | audioSource = null |
The audio source through which to play the clip. | |
bool | usePlayOneShot = false |
bool | interruptAudioClip = false |
If audio clip is still playing from previous character, stop and restart it when typing next character. | |
bool | stopAudioOnSilentCharacters = false |
bool | stopAudioOnPauseCodes = false |
string | silentCharacters = string.Empty |
Don't play audio on these characters. | |
string | fullPauseCharacters = string.Empty |
Play a full pause on these characters. | |
string | quarterPauseCharacters = string.Empty |
Play a quarter pause on these characters. | |
float | fullPauseDuration = 1f |
Duration to pause on when text contains '\. | |
float | quarterPauseDuration = 0.25f |
Duration to pause when text contains '\,'. | |
bool | removeDuplicateTypewriterEffects = true |
Ensures this GameObject has only one typewriter effect. | |
bool | playOnEnable = true |
Play using the current text content whenever component is enabled. | |
bool | waitOneFrameBeforeStarting = false |
Wait one frame to allow layout elements to setup first. | |
bool | stopOnConversationEnd = false |
Stop typing when the conversation ends. | |
Protected Member Functions | |
virtual void | PreprocessPauseCharacters () |
Process anything special in full/quarterPauseCharacters, such as to newlines. | |
virtual bool | IsFullPauseCharacter (char c) |
virtual bool | IsQuarterPauseCharacter (char c) |
virtual bool | IsSilentCharacter (char c) |
bool | IsCharacterInString (char c, string s) |
virtual void | PlayCharacterAudio (char c) |
virtual void | PlayCharacterAudio () |
virtual IEnumerator | PauseForDuration (float duration) |
Protected Attributes | |
bool | paused = false |
Properties | |
bool | isPlaying [get] |
This is an abstract base typewriter class.
It's the ancestor of UnityUITypewriterEffect and TextMeshProTypewriterEffect.
|
inlinevirtual |
|
inlinevirtual |
Returns the typewriter's charactersPerSecond.
|
inlineprotected |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlinevirtual |
Reimplemented in PixelCrushers.DialogueSystem.UnityUITypewriterEffect.
|
inlinevirtual |
Reimplemented in PixelCrushers.DialogueSystem.UnityUITypewriterEffect.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Process anything special in full/quarterPauseCharacters, such as
to newlines.
|
inlinevirtual |
Sets the typewriter's charactersPerSecond.
Takes effect the next time the typewriter is used.
|
abstract |
|
abstract |
|
abstract |
|
inlinevirtual |
|
inlinevirtual |
|
abstract |
|
inlinestatic |
AudioClip [] PixelCrushers.DialogueSystem.AbstractTypewriterEffect.alternateAudioClips = new AudioClip[0] |
If specified, randomly use these clips or the main Audio Clip.
AudioClip PixelCrushers.DialogueSystem.AbstractTypewriterEffect.audioClip = null |
The audio clip to play with each character.
AudioSource PixelCrushers.DialogueSystem.AbstractTypewriterEffect.audioSource = null |
The audio source through which to play the clip.
If unassigned, will look for an audio source on this GameObject.
float PixelCrushers.DialogueSystem.AbstractTypewriterEffect.charactersPerSecond = 50 |
How fast to "type.".
string PixelCrushers.DialogueSystem.AbstractTypewriterEffect.fullPauseCharacters = string.Empty |
Play a full pause on these characters.
float PixelCrushers.DialogueSystem.AbstractTypewriterEffect.fullPauseDuration = 1f |
Duration to pause on when text contains '\.
'
bool PixelCrushers.DialogueSystem.AbstractTypewriterEffect.interruptAudioClip = false |
If audio clip is still playing from previous character, stop and restart it when typing next character.
|
protected |
bool PixelCrushers.DialogueSystem.AbstractTypewriterEffect.playOnEnable = true |
Play using the current text content whenever component is enabled.
string PixelCrushers.DialogueSystem.AbstractTypewriterEffect.quarterPauseCharacters = string.Empty |
Play a quarter pause on these characters.
float PixelCrushers.DialogueSystem.AbstractTypewriterEffect.quarterPauseDuration = 0.25f |
Duration to pause when text contains '\,'.
bool PixelCrushers.DialogueSystem.AbstractTypewriterEffect.removeDuplicateTypewriterEffects = true |
Ensures this GameObject has only one typewriter effect.
bool PixelCrushers.DialogueSystem.AbstractTypewriterEffect.rightToLeft = false |
Set true
to type right to left.
string PixelCrushers.DialogueSystem.AbstractTypewriterEffect.silentCharacters = string.Empty |
Don't play audio on these characters.
bool PixelCrushers.DialogueSystem.AbstractTypewriterEffect.stopAudioOnPauseCodes = false |
bool PixelCrushers.DialogueSystem.AbstractTypewriterEffect.stopAudioOnSilentCharacters = false |
bool PixelCrushers.DialogueSystem.AbstractTypewriterEffect.stopOnConversationEnd = false |
Stop typing when the conversation ends.
bool PixelCrushers.DialogueSystem.AbstractTypewriterEffect.usePlayOneShot = false |
bool PixelCrushers.DialogueSystem.AbstractTypewriterEffect.waitOneFrameBeforeStarting = false |
Wait one frame to allow layout elements to setup first.
|
getabstract |