new Sound(game, key, volume, loop)
The Sound class constructor.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
game | Phaser.Game | Reference to the current game instance. | ||
key | string | Asset key for the sound. | ||
volume | number | <optional> | 1 | Default value for the volume, between 0 and 1. |
loop | boolean | <optional> | false | Whether or not the sound will loop. |
- Source code: sound/Sound.js (Line 17)
Please login to continue.