Constructor
new SoundManager(game)
The Sound Manager offers audio functions.
Parameters:
Name | Type | Description |
---|---|---|
game |
Carrot.Game | The core game object. |
Methods
loop()
Plays a sound and repeats it forever.
play()
Plays a sound. If the sound is already playing, restart it.
resume()
Resumes a sound.
resume()
Pauses a sound.
stop()
Stops a sound.
volume()
Changes the volume of a sound.