Private _current_Private bgm_Private dataPrivate gamePrivate playing_Private se_Static Private Readonly DEFAULT_Default bgm volume
Static Private Readonly VOLUME_Volume change held threshold
Static Private Readonly VOLUME_Volume step to apply upon volume altering
The current BGM Phaser.Sound object.
Private alter_Pauses a bgm.
Optional bgm_identifier: stringthe bgm identifier to be paused. If not passed, it will pause current bgm.
if true, the bgm will fade out before pausing.
the fadeout duration in ms.
Plays current activated bgm sound.
Whether the bgm should loop or not.
Optional volume: numberThe volume to be applied. [0,1].
Optional on_complete: (() => void)On bgm complete callback.
if true, the bgm will fade in on start.
The fade in duration in ms.
Adds a new BGM audio to Phaser sound manager and plays it. You can give an unique name for this BGM by passing 'bgm_identifier' argument.
The bgm key name registered in the json db.
Whether the bgm should loop or not.
Optional volume: numberThe volume to be applied. [0,1].
Optional on_complete: (() => void)On bgm complete callback.
if true, the bgm will fade in on start.
The fade in duration in ms.
Optional bgm_identifier: stringan unique name for this bgm.
returns the Phaser.Sound object.
Plays a registered sound effect.
the sound effect key name.
Optional on_stop: Functionon sfx stop callback function.
the amount of time in sec. to initially cut of this sfx.
the volume that it will be plays. [0,1].
Returns the Phaser.Sound instance.
Plays a registered sound effect, pausing the current bgm before and resuming it after
the sound effect key name.
the amount of time in sec. to initially cut of this sfx.
the volume that it will be plays. [0,1].
Stops a bgm. If 'bgm_identifier', the bgm entry is removed on stop finish.
Optional bgm_identifier: stringthe bgm identifier to be stopped. If not passed, it will stop current bgm.
if true, the bgm will fade out before stopping.
the fadeout duration in ms.
This class is responsible for manipulating background musics (BGM) and sound effect audios (SFX) of the engine.