Skip to content

Commit 94e834f

Browse files
Updating all sounds on sound manager update
1 parent 62ca1be commit 94e834f

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

v3/src/sound/BaseSoundManager.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,17 @@ var BaseSoundManager = new Class({
8484
stopAll: NOOP,
8585
onBlur: NOOP,
8686
onFocus: NOOP,
87-
update: NOOP,
87+
/**
88+
* Update method called on every game step.
89+
*
90+
* @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.
91+
* @param {number} delta - The delta time elapsed since the last frame.
92+
*/
93+
update: function (time, delta) {
94+
this.sounds.forEach(function (sound) {
95+
sound.update(time, delta);
96+
});
97+
},
8898
destroy: NOOP
8999
});
90100
module.exports = BaseSoundManager;

0 commit comments

Comments
 (0)