Handles playback of background music, 2D and 3D one-shot clips during the game. Makes use of the PoolManager for activating 3D AudioSources at desired world positions.
More...
|
static AudioManager | GetInstance () |
| Returns a reference to this script instance. More...
|
|
static void | PlayMusic (int index) |
| Play sound clip in 2D on the background audio source. There can only be one music clip playing at the same time. Only plays music if the player enabled it in the settings. More...
|
|
static void | Play2D (AudioClip clip) |
| Play sound clip passed in in 2D space. More...
|
|
static void | Play3D (AudioClip clip, Vector3 position, float pitch=0f) |
| Play sound clip passed in in 3D space, with optional random pitch (0-1 range). Automatically creates an audio source for playback using our PoolManager. More...
|
|
Handles playback of background music, 2D and 3D one-shot clips during the game. Makes use of the PoolManager for activating 3D AudioSources at desired world positions.
Returns a reference to this script instance.
static void Play2D |
( |
AudioClip |
clip | ) |
|
|
static |
Play sound clip passed in in 2D space.
static void Play3D |
( |
AudioClip |
clip, |
|
|
Vector3 |
position, |
|
|
float |
pitch = 0f |
|
) |
| |
|
static |
Play sound clip passed in in 3D space, with optional random pitch (0-1 range). Automatically creates an audio source for playback using our PoolManager.
static void PlayMusic |
( |
int |
index | ) |
|
|
static |
Play sound clip in 2D on the background audio source. There can only be one music clip playing at the same time. Only plays music if the player enabled it in the settings.
AudioSource for playing back one-shot 2D clips.
Array for storing background music clips, so they can be referenced in PlayMusic() by passing in their index value.
AudioSource for playing back lengthy music clips.
Prefab instantiated for playing back one-shot 3D clips.
The documentation for this class was generated from the following file: