Adds a new sound to the sound manager and plays it. The sound will be automatically removed (destroyed) once playback ends. This lets you play a new sound on the fly without the need to keep a reference to it.
name | type | arguments | description |
---|---|---|---|
key | string |
Asset key for the sound. |
|
extra | Phaser.Types.Sound.SoundConfig | Phaser.Types.Sound.SoundMarker | <optional> |
An optional additional object containing settings to be applied to the sound. It could be either config or marker object. |
Whether the sound started playing successfully.