add(key, volume, loop, connect) → {Phaser.Sound}
Adds a new Sound into the SoundManager.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
key | string | Asset key for the sound. | ||
volume | number | <optional> | 1 | Default value for the volume. |
loop | boolean | <optional> | false | Whether or not the sound will loop. |
connect | boolean | <optional> | true | Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. |
Returns
The new sound instance.
- Source code: sound/SoundManager.js (Line 540)
Please login to continue.