Text Animator Players Sound
Last updated
Last updated
You're reading the documentation of an older/legacy version, Text Animator 1.X. To read the latest version, please visit this page instead . How to update:
To implement typewriter sounds in your game, you can subscribe to the TextAnimatorPlayer's "OnCharacterVisible
" event and play sounds based on it.
The event passes a "char" as a parameter, so you can play different sounds based on different letters as well.
P.S. The event is not triggered with spaces.
As an example, you can install the "TypeWriter Sounds" package found inside the "Extra" folder and check its implementation.
Source
: main audio source where sounds will be played.
MinSoundDelay
: minimum time that has to pass before playing another sound.
Interrupt Previous Sound
: If true, the previous audio will be stopped.
Random Sequence
: If true, the next audio clip to play will be chosen randomly from the "Sounds" array. If false, sounds will be played subsequently.
Sounds
: Typewriter sounds to play.