SoundManager#add()

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)
doc_phaser
2017-02-14 11:10:01
Comments
Leave a Comment

Please login to continue.