Updating all sounds on sound manager update

This commit is contained in:
Pavle Goloskokovic 2017-11-26 16:59:12 +01:00
parent 62ca1bef8a
commit 94e834fa96

View file

@ -84,7 +84,17 @@ var BaseSoundManager = new Class({
stopAll: NOOP,
onBlur: NOOP,
onFocus: NOOP,
update: NOOP,
/**
* Update method called on every game step.
*
* @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.
* @param {number} delta - The delta time elapsed since the last frame.
*/
update: function (time, delta) {
this.sounds.forEach(function (sound) {
sound.update(time, delta);
});
},
destroy: NOOP
});
module.exports = BaseSoundManager;