You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SoundManager.onVolumeChange is a new signal that is dispatched whenever the global volume changes. The new volume is passed as the only parameter to your callback.
SoundManager.onMute is a new signal that is dispatched when the SoundManager is globally muted, either directly via game code or as a result of the game pausing.
SoundManager.onUnMute is a new signal that is dispatched when the SoundManager is globally un-muted, either directly via game code or as a result of the game resuming from a pause.
Copy file name to clipboardExpand all lines: src/sound/SoundManager.js
+88-54Lines changed: 88 additions & 54 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,24 @@ Phaser.SoundManager = function (game) {
30
30
*/
31
31
this.onSoundDecode=newPhaser.Signal();
32
32
33
+
/**
34
+
* This signal is dispatched whenever the global volume changes. The new volume is passed as the only parameter to your callback.
35
+
* @property {Phaser.Signal} onVolumeChange
36
+
*/
37
+
this.onVolumeChange=newPhaser.Signal();
38
+
39
+
/**
40
+
* This signal is dispatched when the SoundManager is globally muted, either directly via game code or as a result of the game pausing.
41
+
* @property {Phaser.Signal} onMute
42
+
*/
43
+
this.onMute=newPhaser.Signal();
44
+
45
+
/**
46
+
* This signal is dispatched when the SoundManager is globally un-muted, either directly via game code or as a result of the game resuming from a pause.
47
+
* @property {Phaser.Signal} onUnMute
48
+
*/
49
+
this.onUnMute=newPhaser.Signal();
50
+
33
51
/**
34
52
* @property {boolean} _codeMuted - Internal mute tracking var.
0 commit comments