Hydrogen Framework
1.3.1
|
A stack system for 2D audio sources. More...
Public Member Functions | |
string | Add (AudioClip clip) |
Add/Load an AudioStackItem More... | |
string | Add (AudioClip clip, bool createDuplicate) |
Add/Load an AudioStackItem More... | |
string | Add (AudioStackItem item) |
Add/Load an AudioStackItem More... | |
string | Add (AudioStackItem item, bool createDuplicate) |
Add/Load an AudioStackItem More... | |
bool | IsLoaded (AudioClip clip) |
Determines whether an AudioClip is currently loaded and managed by the AudioStack. More... | |
bool | IsLoaded (AudioStackItem item) |
Determines whether an AudioStackItem is currently loaded and managed by the AudioStack. More... | |
bool | IsLoaded (string key) |
Determines whether there is something loaded in the AudioStack based on the reference key. More... | |
bool | IsPlaying (AudioClip clip) |
Determines whether an AudioClip is playing. More... | |
bool | IsPlaying (AudioStackItem item) |
Determines whether an AudioStackItem is playing. More... | |
bool | IsPlaying (string key) |
Determines whether an AudioStackItem is playing by reference to the specified key. More... | |
void | Remove (AudioClip clip) |
Removes the specified AudioClip and its associated AudioStackItem from the AudioStack. More... | |
void | Remove (AudioStackItem item) |
Removes the specified AudioStackItem from the AudioStack. More... | |
void | Remove (string key) |
Remove the AudioStackItem associated to the specified key in the AudioStack. More... | |
Public Attributes | |
int | MaximumSources = 20 |
Maximum number of sources to have in total (Stack + Playing). More... | |
int | MinimumSources = 10 |
Minimum number of sources to have in total (Stack + Playing). More... | |
bool | UsePriorities |
Should the stack look at the priority of the existing Audio Stack Items playing, and if the stack is full stop the lowest and use it's newly available source to play the new item. More... | |
Protected Member Functions | |
virtual void | Awake () |
Unity's Awake Event More... | |
virtual void | Update () |
Unity's Update Event More... | |
Properties | |
Dictionary< string, AudioStackItem > | LoadedItems [get] |
Gets all currently loaded AudioStackItems. More... | |
int | SourcesCount [get] |
The number of currently used AudioSources. More... | |
A stack system for 2D audio sources.
This should NEVER be used for 3D audio sources.
Definition at line 40 of file AudioStack.cs.
string Hydrogen.Core.AudioStack.Add | ( | AudioClip | clip | ) |
Add/Load an AudioStackItem
clip | An AudioClip to be used to create a new AudioStackItem from. |
Definition at line 89 of file AudioStack.cs.
string Hydrogen.Core.AudioStack.Add | ( | AudioClip | clip, |
bool | createDuplicate | ||
) |
Add/Load an AudioStackItem
clip | An AudioClip to be used to create a new AudioStackItem from. |
createDuplicate | Create a duplicate entry if need be. |
Definition at line 99 of file AudioStack.cs.
string Hydrogen.Core.AudioStack.Add | ( | AudioStackItem | item | ) |
Add/Load an AudioStackItem
item | An AudioStackItem. |
Definition at line 108 of file AudioStack.cs.
string Hydrogen.Core.AudioStack.Add | ( | AudioStackItem | item, |
bool | createDuplicate | ||
) |
Add/Load an AudioStackItem
item | An AudioStackItem. |
createDuplicate | Create a duplicate entry if need be. |
Definition at line 118 of file AudioStack.cs.
|
protectedvirtual |
Unity's Awake Event
Reimplemented in hAudioStack.
Definition at line 317 of file AudioStack.cs.
bool Hydrogen.Core.AudioStack.IsLoaded | ( | AudioClip | clip | ) |
Determines whether an AudioClip is currently loaded and managed by the AudioStack.
clip | An AudioClip. |
Definition at line 211 of file AudioStack.cs.
bool Hydrogen.Core.AudioStack.IsLoaded | ( | AudioStackItem | item | ) |
Determines whether an AudioStackItem is currently loaded and managed by the AudioStack.
item | An AudioStackItem. |
Definition at line 221 of file AudioStack.cs.
bool Hydrogen.Core.AudioStack.IsLoaded | ( | string | key | ) |
Determines whether there is something loaded in the AudioStack based on the reference key.
key | Target Key. |
Definition at line 231 of file AudioStack.cs.
bool Hydrogen.Core.AudioStack.IsPlaying | ( | AudioClip | clip | ) |
Determines whether an AudioClip is playing.
Must be playing through a managed AudioSource.
clip | An AudioClip. |
Definition at line 242 of file AudioStack.cs.
bool Hydrogen.Core.AudioStack.IsPlaying | ( | AudioStackItem | item | ) |
Determines whether an AudioStackItem is playing.
item | An AudioStackItem. |
Definition at line 252 of file AudioStack.cs.
bool Hydrogen.Core.AudioStack.IsPlaying | ( | string | key | ) |
Determines whether an AudioStackItem is playing by reference to the specified key.
key | Target Key. |
Definition at line 262 of file AudioStack.cs.
void Hydrogen.Core.AudioStack.Remove | ( | AudioClip | clip | ) |
Removes the specified AudioClip and its associated AudioStackItem from the AudioStack.
clip | An AudioClip. |
Definition at line 271 of file AudioStack.cs.
void Hydrogen.Core.AudioStack.Remove | ( | AudioStackItem | item | ) |
Removes the specified AudioStackItem from the AudioStack.
item | An AudioStackItem. |
Definition at line 282 of file AudioStack.cs.
void Hydrogen.Core.AudioStack.Remove | ( | string | key | ) |
Remove the AudioStackItem associated to the specified key in the AudioStack.
key | Target Key. |
Definition at line 307 of file AudioStack.cs.
|
protectedvirtual |
Unity's Update Event
> This neeeds to be executed to handle processing the Audio Sources correctly.
Definition at line 348 of file AudioStack.cs.
int Hydrogen.Core.AudioStack.MaximumSources = 20 |
Maximum number of sources to have in total (Stack + Playing).
Definition at line 45 of file AudioStack.cs.
int Hydrogen.Core.AudioStack.MinimumSources = 10 |
Minimum number of sources to have in total (Stack + Playing).
Definition at line 49 of file AudioStack.cs.
bool Hydrogen.Core.AudioStack.UsePriorities |
Should the stack look at the priority of the existing Audio Stack Items playing, and if the stack is full stop the lowest and use it's newly available source to play the new item.
This will ignore any playing sources that are set to loop.
Definition at line 55 of file AudioStack.cs.
|
get |
Gets all currently loaded AudioStackItems.
The loaded AudioStackItems with their associated keys.
Definition at line 73 of file AudioStack.cs.
|
get |
The number of currently used AudioSources.
Used AudioSource Count.
Definition at line 81 of file AudioStack.cs.