Skip to content

Commit 8c9ba8c

Browse files
Pasing reference to sound manager when emitting pauseall event
1 parent a76a721 commit 8c9ba8c

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/sound/BaseSoundManager.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
var Class = require('../utils/Class');
22
var NOOP = require('../utils/NOOP');
33
var EventEmitter = require('eventemitter3');
4-
54
/*!
65
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
76
*/
87
var BaseSoundManager = new Class({
9-
108
Extends: EventEmitter,
11-
129
/**
1310
* The sound manager is responsible for playing back audio via Web Audio API or HTML Audio tag as fallback.
1411
* The audio file type and the encoding of those files are extremely important.
@@ -20,9 +17,7 @@ var BaseSoundManager = new Class({
2017
* @param {Phaser.Game} game - Reference to the current game instance.
2118
*/
2219
initialize: function BaseSoundManager(game) {
23-
2420
EventEmitter.call(this);
25-
2621
/**
2722
* Local reference to game.
2823
*
@@ -228,7 +223,7 @@ var BaseSoundManager = new Class({
228223
this.forEachActiveSound(function (sound) {
229224
sound.pause();
230225
});
231-
this.emit('pauseall');
226+
this.emit('pauseall', this);
232227
},
233228
/**
234229
* Resumes all the sounds in the game.

0 commit comments

Comments
 (0)