mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Dispatching event when global rate value changes
This commit is contained in:
parent
3b5289a733
commit
f6976daf2b
1 changed files with 2 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
var Class = require('../utils/Class');
|
||||
var NOOP = require('../utils/NOOP');
|
||||
var EventDispatcher = require('../events/EventDispatcher');
|
||||
var SoundValueEvent = require('./SoundValueEvent');
|
||||
// Phaser.Sound.BaseSoundManager
|
||||
var BaseSoundManager = new Class({
|
||||
initialize: function BaseSoundManager(game) {
|
||||
|
@ -155,6 +156,7 @@ Object.defineProperty(BaseSoundManager.prototype, 'rate', {
|
|||
this.sounds.forEach(function (sound) {
|
||||
sound.setRate();
|
||||
}, this);
|
||||
this.events.dispatch(new SoundValueEvent(this, 'SOUND_RATE', value));
|
||||
}
|
||||
});
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue