v3.6.1 Documentation
Fungus.ControlAudio Class Reference

Plays, loops, or stops an audiosource. More...

Inheritance diagram for Fungus.ControlAudio:
Fungus.Command

Public Member Functions

override void OnEnter ()
 Called when this command starts execution. More...
 
override string GetSummary ()
 Returns the summary text to display in the command inspector. More...
 
override Color GetButtonColor ()
 Return the color for the command background in inspector. More...
 
- Public Member Functions inherited from Fungus.Command
virtual Flowchart GetFlowchart ()
 Returns the Flowchart that this command belongs to. More...
 
virtual void Execute ()
 Execute the command. More...
 
virtual void Continue ()
 End execution of this command and continue execution at the next command. More...
 
virtual void Continue (int nextCommandIndex)
 End execution of this command and continue execution at a specific command index. More...
 
virtual void StopParentBlock ()
 Stops the parent Block executing. More...
 
virtual void OnStopExecuting ()
 Called when the parent block has been requested to stop executing, and this command is the currently executing command. More...
 
virtual void OnCommandAdded (Block parentBlock)
 Called when the new command is added to a block in the editor. More...
 
virtual void OnCommandRemoved (Block parentBlock)
 Called when the command is deleted from a block in the editor. More...
 
virtual void OnExit ()
 Called when this command ends execution. More...
 
virtual void OnReset ()
 Called when this command is reset. More...
 
virtual void GetConnectedBlocks (ref List< Block > connectedBlocks)
 Populates a list with the Blocks that this command references. More...
 
virtual bool HasReference (Variable variable)
 Returns true if this command references the variable. More...
 
virtual string GetHelpText ()
 Returns the help text to display for this command. More...
 
virtual bool OpenBlock ()
 Return true if this command opens a block of commands. More...
 
virtual bool CloseBlock ()
 Return true if this command closes a block of commands. More...
 
virtual bool IsPropertyVisible (string propertyName)
 Returns true if the specified property should be displayed in the inspector. More...
 
virtual bool IsReorderableArray (string propertyName)
 Returns true if the specified property should be displayed as a reorderable list in the inspector. More...
 
virtual string GetFlowchartLocalizationId ()
 Returns the localization id for the Flowchart that contains this command. More...
 

Public Attributes

AudioSource audioSourceOLD
 

Protected Member Functions

virtual void StopAudioWithSameTag ()
 
virtual void PlayOnce ()
 
virtual IEnumerator WaitAndContinue ()
 
virtual void PlayLoop ()
 
virtual void PauseLoop ()
 
virtual void StopLoop (AudioSource source)
 
virtual void ChangeVolume ()
 
virtual void AudioFinished ()
 
virtual void OnEnable ()
 

Protected Attributes

ControlAudioType control
 
AudioSourceData _audioSource
 
float startVolume = 1
 
float endVolume = 1
 
float fadeDuration
 
bool waitUntilFinished = false
 
- Protected Attributes inherited from Fungus.Command
int itemId = -1
 
int indentLevel
 
string errorMessage = ""
 

Properties

virtual ControlAudioType Control [get]
 
- Properties inherited from Fungus.Command
virtual int ItemId [get, set]
 Unique identifier for this command. More...
 
virtual string ErrorMessage [get]
 Error message to display in the command inspector. More...
 
virtual int IndentLevel [get, set]
 Indent depth of the current commands. More...
 
virtual int CommandIndex [get, set]
 Index of the command in the parent block's command list. More...
 
virtual bool IsExecuting [get, set]
 Set to true by the parent block while the command is executing. More...
 
virtual float ExecutingIconTimer [get, set]
 Timer used to control appearance of executing icon in inspector. More...
 
virtual Block ParentBlock [get, set]
 Reference to the Block object that this command belongs to. More...
 

Detailed Description

Plays, loops, or stops an audiosource.

Any AudioSources with the same tag as the target Audio Source will automatically be stoped.

Definition at line 34 of file ControlAudio.cs.

Member Function Documentation

◆ AudioFinished()

virtual void Fungus.ControlAudio.AudioFinished ( )
protectedvirtual

Definition at line 210 of file ControlAudio.cs.

◆ ChangeVolume()

virtual void Fungus.ControlAudio.ChangeVolume ( )
protectedvirtual

Definition at line 195 of file ControlAudio.cs.

◆ GetButtonColor()

override Color Fungus.ControlAudio.GetButtonColor ( )
virtual

Return the color for the command background in inspector.

Returns
The button color.

Reimplemented from Fungus.Command.

Definition at line 282 of file ControlAudio.cs.

◆ GetSummary()

override string Fungus.ControlAudio.GetSummary ( )
virtual

Returns the summary text to display in the command inspector.

Reimplemented from Fungus.Command.

Definition at line 259 of file ControlAudio.cs.

◆ OnEnable()

virtual void Fungus.ControlAudio.OnEnable ( )
protectedvirtual

Definition at line 293 of file ControlAudio.cs.

◆ OnEnter()

override void Fungus.ControlAudio.OnEnter ( )
virtual

Called when this command starts execution.

Reimplemented from Fungus.Command.

Definition at line 220 of file ControlAudio.cs.

◆ PauseLoop()

virtual void Fungus.ControlAudio.PauseLoop ( )
protectedvirtual

Definition at line 143 of file ControlAudio.cs.

◆ PlayLoop()

virtual void Fungus.ControlAudio.PlayLoop ( )
protectedvirtual

Definition at line 114 of file ControlAudio.cs.

◆ PlayOnce()

virtual void Fungus.ControlAudio.PlayOnce ( )
protectedvirtual

Definition at line 79 of file ControlAudio.cs.

◆ StopAudioWithSameTag()

virtual void Fungus.ControlAudio.StopAudioWithSameTag ( )
protectedvirtual

Definition at line 59 of file ControlAudio.cs.

◆ StopLoop()

virtual void Fungus.ControlAudio.StopLoop ( AudioSource  source)
protectedvirtual

Definition at line 169 of file ControlAudio.cs.

◆ WaitAndContinue()

virtual IEnumerator Fungus.ControlAudio.WaitAndContinue ( )
protectedvirtual

Definition at line 102 of file ControlAudio.cs.

Member Data Documentation

◆ _audioSource

AudioSourceData Fungus.ControlAudio._audioSource
protected

Definition at line 41 of file ControlAudio.cs.

◆ audioSourceOLD

AudioSource Fungus.ControlAudio.audioSourceOLD

Definition at line 291 of file ControlAudio.cs.

◆ control

ControlAudioType Fungus.ControlAudio.control
protected

Definition at line 37 of file ControlAudio.cs.

◆ endVolume

float Fungus.ControlAudio.endVolume = 1
protected

Definition at line 49 of file ControlAudio.cs.

◆ fadeDuration

float Fungus.ControlAudio.fadeDuration
protected

Definition at line 52 of file ControlAudio.cs.

◆ startVolume

float Fungus.ControlAudio.startVolume = 1
protected

Definition at line 45 of file ControlAudio.cs.

◆ waitUntilFinished

bool Fungus.ControlAudio.waitUntilFinished = false
protected

Definition at line 55 of file ControlAudio.cs.

Property Documentation

◆ Control

virtual ControlAudioType Fungus.ControlAudio.Control
get

Definition at line 38 of file ControlAudio.cs.


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