v3.9.1 Documentation
Fungus.WriterAudio Class Reference

Manages audio effects for Dialogs. More...

Inheritance diagram for Fungus.WriterAudio:
Fungus.IWriterListener

Public Member Functions

float GetSecondsRemaining ()
 
virtual void OnInput ()
 Called when a user input event (e.g. More...
 
virtual void OnStart (AudioClip audioClip)
 Called when the Writer starts writing new text. More...
 
virtual void OnPause ()
 Called when the Writer has paused writing text (e.g. on a {wi} tag). More...
 
virtual void OnResume ()
 Called when the Writer has resumed writing text. More...
 
virtual void OnEnd (bool stopAudio)
 Called when the Writer has finished writing text. More...
 
virtual void OnGlyph ()
 Called every time the Writer writes a new character glyph. More...
 
virtual void OnVoiceover (AudioClip voiceOverClip)
 Called when voiceover should start. More...
 

Protected Member Functions

virtual void SetAudioMode (AudioMode mode)
 
virtual void Awake ()
 
virtual void Play (AudioClip audioClip)
 
virtual void Pause ()
 
virtual void Stop ()
 
virtual void Resume ()
 
virtual void Update ()
 

Protected Attributes

float volume = 1f
 
bool loop = true
 
AudioSource targetAudioSource
 
AudioMode audioMode = AudioMode.Beeps
 
List< AudioClip > beepSounds = new List<AudioClip>()
 
AudioClip soundEffect
 
AudioClip inputSound
 
float targetVolume = 0f
 
bool playBeeps
 
bool playingVoiceover = false
 
float nextBeepTime
 

Properties

bool IsPlayingVoiceOver [get]
 

Detailed Description

Manages audio effects for Dialogs.

Definition at line 23 of file WriterAudio.cs.

Member Function Documentation

◆ Awake()

virtual void Fungus.WriterAudio.Awake ( )
protectedvirtual

Definition at line 79 of file WriterAudio.cs.

◆ GetSecondsRemaining()

float Fungus.WriterAudio.GetSecondsRemaining ( )

Definition at line 62 of file WriterAudio.cs.

◆ OnEnd()

virtual void Fungus.WriterAudio.OnEnd ( bool  stopAudio)
virtual

Called when the Writer has finished writing text.

Parameters
stopAudioControls whether audio should be stopped when writing ends.

Implements Fungus.IWriterListener.

Definition at line 210 of file WriterAudio.cs.

◆ OnGlyph()

virtual void Fungus.WriterAudio.OnGlyph ( )
virtual

Called every time the Writer writes a new character glyph.

Implements Fungus.IWriterListener.

Definition at line 218 of file WriterAudio.cs.

◆ OnInput()

virtual void Fungus.WriterAudio.OnInput ( )
virtual

Called when a user input event (e.g.

a click) has been handled by the Writer.

Implements Fungus.IWriterListener.

Definition at line 174 of file WriterAudio.cs.

◆ OnPause()

virtual void Fungus.WriterAudio.OnPause ( )
virtual

Called when the Writer has paused writing text (e.g. on a {wi} tag).

Implements Fungus.IWriterListener.

Definition at line 192 of file WriterAudio.cs.

◆ OnResume()

virtual void Fungus.WriterAudio.OnResume ( )
virtual

Called when the Writer has resumed writing text.

Implements Fungus.IWriterListener.

Definition at line 201 of file WriterAudio.cs.

◆ OnStart()

virtual void Fungus.WriterAudio.OnStart ( AudioClip  audioClip)
virtual

Called when the Writer starts writing new text.

Parameters
audioClipAn optional audioClip sound effect can be supplied (e.g. for voiceover)

Implements Fungus.IWriterListener.

Definition at line 183 of file WriterAudio.cs.

◆ OnVoiceover()

virtual void Fungus.WriterAudio.OnVoiceover ( AudioClip  voiceOverClip)
virtual

Called when voiceover should start.

Implements Fungus.IWriterListener.

Definition at line 247 of file WriterAudio.cs.

◆ Pause()

virtual void Fungus.WriterAudio.Pause ( )
protectedvirtual

Definition at line 131 of file WriterAudio.cs.

◆ Play()

virtual void Fungus.WriterAudio.Play ( AudioClip  audioClip)
protectedvirtual

Definition at line 94 of file WriterAudio.cs.

◆ Resume()

virtual void Fungus.WriterAudio.Resume ( )
protectedvirtual

Definition at line 157 of file WriterAudio.cs.

◆ SetAudioMode()

virtual void Fungus.WriterAudio.SetAudioMode ( AudioMode  mode)
protectedvirtual

Definition at line 74 of file WriterAudio.cs.

◆ Stop()

virtual void Fungus.WriterAudio.Stop ( )
protectedvirtual

Definition at line 142 of file WriterAudio.cs.

◆ Update()

virtual void Fungus.WriterAudio.Update ( )
protectedvirtual

Definition at line 167 of file WriterAudio.cs.

Member Data Documentation

◆ audioMode

AudioMode Fungus.WriterAudio.audioMode = AudioMode.Beeps
protected

Definition at line 37 of file WriterAudio.cs.

◆ beepSounds

List<AudioClip> Fungus.WriterAudio.beepSounds = new List<AudioClip>()
protected

Definition at line 40 of file WriterAudio.cs.

◆ inputSound

AudioClip Fungus.WriterAudio.inputSound
protected

Definition at line 46 of file WriterAudio.cs.

◆ loop

bool Fungus.WriterAudio.loop = true
protected

Definition at line 30 of file WriterAudio.cs.

◆ nextBeepTime

float Fungus.WriterAudio.nextBeepTime
protected

Definition at line 59 of file WriterAudio.cs.

◆ playBeeps

bool Fungus.WriterAudio.playBeeps
protected

Definition at line 51 of file WriterAudio.cs.

◆ playingVoiceover

bool Fungus.WriterAudio.playingVoiceover = false
protected

Definition at line 54 of file WriterAudio.cs.

◆ soundEffect

AudioClip Fungus.WriterAudio.soundEffect
protected

Definition at line 43 of file WriterAudio.cs.

◆ targetAudioSource

AudioSource Fungus.WriterAudio.targetAudioSource
protected

Definition at line 34 of file WriterAudio.cs.

◆ targetVolume

float Fungus.WriterAudio.targetVolume = 0f
protected

Definition at line 48 of file WriterAudio.cs.

◆ volume

float Fungus.WriterAudio.volume = 1f
protected

Definition at line 27 of file WriterAudio.cs.

Property Documentation

◆ IsPlayingVoiceOver

bool Fungus.WriterAudio.IsPlayingVoiceOver
get

Definition at line 56 of file WriterAudio.cs.


The documentation for this class was generated from the following file: