mirror of
https://github.com/photonstorm/phaser
synced 2025-02-18 06:58:30 +00:00
Pasing reference to sound manager when emitting pauseall event
This commit is contained in:
parent
a76a721969
commit
8c9ba8ce2c
1 changed files with 1 additions and 6 deletions
|
@ -1,14 +1,11 @@
|
|||
var Class = require('../utils/Class');
|
||||
var NOOP = require('../utils/NOOP');
|
||||
var EventEmitter = require('eventemitter3');
|
||||
|
||||
/*!
|
||||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||||
*/
|
||||
var BaseSoundManager = new Class({
|
||||
|
||||
Extends: EventEmitter,
|
||||
|
||||
/**
|
||||
* The sound manager is responsible for playing back audio via Web Audio API or HTML Audio tag as fallback.
|
||||
* The audio file type and the encoding of those files are extremely important.
|
||||
|
@ -20,9 +17,7 @@ var BaseSoundManager = new Class({
|
|||
* @param {Phaser.Game} game - Reference to the current game instance.
|
||||
*/
|
||||
initialize: function BaseSoundManager(game) {
|
||||
|
||||
EventEmitter.call(this);
|
||||
|
||||
/**
|
||||
* Local reference to game.
|
||||
*
|
||||
|
@ -228,7 +223,7 @@ var BaseSoundManager = new Class({
|
|||
this.forEachActiveSound(function (sound) {
|
||||
sound.pause();
|
||||
});
|
||||
this.emit('pauseall');
|
||||
this.emit('pauseall', this);
|
||||
},
|
||||
/**
|
||||
* Resumes all the sounds in the game.
|
||||
|
|
Loading…
Add table
Reference in a new issue