GameObjectCreator#sound()

sound(key, volume, loop, connect) → {Phaser.Sound}

Creates a new Sound object.

Parameters
Name Type Argument Default Description
key string

The Game.cache key of the sound that this object will use.

volume number <optional>
1

The volume at which the sound will be played.

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 newly created text object.

Source code: gameobjects/GameObjectCreator.js (Line 147)
doc_phaser
2017-02-14 10:48:33
Comments
Leave a Comment

Please login to continue.