◆ Awake()
void BackgroundMusic.Awake |
( |
| ) |
|
Initialize the AudioSource amd makes sure it is looping.
◆ GetObjectPoolerKey()
string BackgroundMusic.GetObjectPoolerKey |
( |
| ) |
|
◆ Play()
void BackgroundMusic.Play |
( |
| ) |
|
/brief Plays the audioSource.
◆ SetPitch()
void BackgroundMusic.SetPitch |
( |
float |
pitch | ) |
|
Sets the pitch of the audio source. Setting the pitch below 1 lowers the pitch to simulate the music playing slow motion.
◆ SetVolume()
void BackgroundMusic.SetVolume |
( |
float |
volume | ) |
|
Master volume control for the background music.
- Parameters
-
volume | New volume for sound effects. Clamped between 0 and 1 |
◆ Stop()
void BackgroundMusic.Stop |
( |
| ) |
|
/brief Stops the audioSource.
◆ audioSourcePrefab
AudioSource BackgroundMusic.audioSourcePrefab |
◆ poolKey
string BackgroundMusic.poolKey |
The documentation for this class was generated from the following file: