Hydrogen Framework
1.3.1
|
A class represention of all information needed for an AudioClip to be played via the AudioStack. More...
Public Member Functions | |
AudioStackItem () | |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class. More... | |
AudioStackItem (AudioClip clip) | |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class. More... | |
AudioStackItem (AudioClip clip, bool loop) | |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class. More... | |
AudioStackItem (AudioClip clip, string key) | |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class. More... | |
AudioStackItem (AudioClip clip, string key, bool loop) | |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class. More... | |
void | Pause () |
Instruct the AudioSource to Pause playback. More... | |
void | Play () |
Instruct the AudioSource to play the currently loaded clip from its currently set position. More... | |
void | Process () |
Process / Update our AudioStackItem More... | |
void | Restart () |
Instruct the AudioSource to Restart playback, resetting the position to the start of the clip, and playing it. More... | |
void | Stop () |
Instruct the AudioSource to Stop playback, resetting the position in the clip. More... | |
Public Attributes | |
AudioClip | Clip |
The associated AudioClip More... | |
string | Key |
Key to be used by the AudioStack More... | |
float | FadeInSpeed = 4.5f |
/// Fade In Speed, used in a Lerp. More... | |
float | FadeOutSpeed = 5.0f |
Fade Out Speed, used in a Lerp. More... | |
bool | Fade |
Should the AudioSource fade between volume levels? More... | |
bool | Loop |
Should the AudioSource loop the clip? More... | |
float | MaxVolume = 1f |
The max volume for the item. More... | |
bool | Persistant |
Do not remove the AudioItem when finished playing, useful for menu clicks etc More... | |
bool | PlayOnLoad = true |
Should the Audio Clip be played automatically upon load? More... | |
int | Priority = 128 |
The priority that this Audio Stack Item takes over all other sounds playing through the stack. More... | |
bool | RemoveAfterFadeOut = true |
Should the AudioPoolItem be destroyed, freeing it's AudioSource when it's volume reaches 0 after fading More... | |
float | StartVolume = 1f |
The volume to use when the sound is first played. More... | |
float | TargetVolume = 1f |
The volume which the AudioSource should gravitate towards. More... | |
A class represention of all information needed for an AudioClip to be played via the AudioStack.
Definition at line 36 of file AudioStackItem.cs.
Hydrogen.Core.AudioStackItem.AudioStackItem | ( | ) |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class.
Definition at line 110 of file AudioStackItem.cs.
Hydrogen.Core.AudioStackItem.AudioStackItem | ( | AudioClip | clip | ) |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class.
clip | An AudioClip |
Definition at line 118 of file AudioStackItem.cs.
Hydrogen.Core.AudioStackItem.AudioStackItem | ( | AudioClip | clip, |
bool | loop | ||
) |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class.
clip | An AudioClip. |
loop | Should the AudioSource loop? |
Definition at line 129 of file AudioStackItem.cs.
Hydrogen.Core.AudioStackItem.AudioStackItem | ( | AudioClip | clip, |
string | key | ||
) |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class.
clip | An AudioClip. |
key | Designate Reference Key. |
Definition at line 141 of file AudioStackItem.cs.
Hydrogen.Core.AudioStackItem.AudioStackItem | ( | AudioClip | clip, |
string | key, | ||
bool | loop | ||
) |
Initializes a new instance of the Hydrogen.Core.AudioStackItem class.
clip | An AudioClip. |
key | Designate Reference Key. |
loop | Should the AudioSource loop? |
Definition at line 153 of file AudioStackItem.cs.
void Hydrogen.Core.AudioStackItem.Pause | ( | ) |
Instruct the AudioSource to Pause playback.
Definition at line 163 of file AudioStackItem.cs.
void Hydrogen.Core.AudioStackItem.Play | ( | ) |
Instruct the AudioSource to play the currently loaded clip from its currently set position.
Definition at line 171 of file AudioStackItem.cs.
void Hydrogen.Core.AudioStackItem.Process | ( | ) |
Process / Update our AudioStackItem
Definition at line 179 of file AudioStackItem.cs.
void Hydrogen.Core.AudioStackItem.Restart | ( | ) |
Instruct the AudioSource to Restart playback, resetting the position to the start of the clip, and playing it.
Definition at line 212 of file AudioStackItem.cs.
void Hydrogen.Core.AudioStackItem.Stop | ( | ) |
Instruct the AudioSource to Stop playback, resetting the position in the clip.
Definition at line 221 of file AudioStackItem.cs.
AudioClip Hydrogen.Core.AudioStackItem.Clip |
The associated AudioClip
Definition at line 41 of file AudioStackItem.cs.
bool Hydrogen.Core.AudioStackItem.Fade |
Should the AudioSource fade between volume levels?
Definition at line 60 of file AudioStackItem.cs.
float Hydrogen.Core.AudioStackItem.FadeInSpeed = 4.5f |
/// Fade In Speed, used in a Lerp.
Definition at line 52 of file AudioStackItem.cs.
float Hydrogen.Core.AudioStackItem.FadeOutSpeed = 5.0f |
Fade Out Speed, used in a Lerp.
Definition at line 56 of file AudioStackItem.cs.
string Hydrogen.Core.AudioStackItem.Key |
Key to be used by the AudioStack
Should be unique to the AudioClip's file name.
Definition at line 48 of file AudioStackItem.cs.
bool Hydrogen.Core.AudioStackItem.Loop |
Should the AudioSource loop the clip?
Definition at line 64 of file AudioStackItem.cs.
float Hydrogen.Core.AudioStackItem.MaxVolume = 1f |
The max volume for the item.
Definition at line 68 of file AudioStackItem.cs.
bool Hydrogen.Core.AudioStackItem.Persistant |
Do not remove the AudioItem when finished playing, useful for menu clicks etc
Definition at line 72 of file AudioStackItem.cs.
bool Hydrogen.Core.AudioStackItem.PlayOnLoad = true |
Should the Audio Clip be played automatically upon load?
Definition at line 76 of file AudioStackItem.cs.
int Hydrogen.Core.AudioStackItem.Priority = 128 |
The priority that this Audio Stack Item takes over all other sounds playing through the stack.
Definition at line 80 of file AudioStackItem.cs.
bool Hydrogen.Core.AudioStackItem.RemoveAfterFadeOut = true |
Should the AudioPoolItem be destroyed, freeing it's AudioSource when it's volume reaches 0 after fading
Definition at line 84 of file AudioStackItem.cs.
float Hydrogen.Core.AudioStackItem.StartVolume = 1f |
The volume to use when the sound is first played.
Definition at line 101 of file AudioStackItem.cs.
float Hydrogen.Core.AudioStackItem.TargetVolume = 1f |
The volume which the AudioSource should gravitate towards.
Definition at line 105 of file AudioStackItem.cs.