2018-01-08 18:25:11 +00:00
|
|
|
var Class = require('../../utils/Class');
|
|
|
|
var BaseSoundManager = require('../BaseSoundManager');
|
2018-01-08 18:26:32 +00:00
|
|
|
var HTML5AudioSound = require('./HTML5AudioSound');
|
2018-01-08 18:25:11 +00:00
|
|
|
var HTML5AudioSoundManager = new Class({
|
|
|
|
Extends: BaseSoundManager,
|
|
|
|
initialize: function HTML5AudioSoundManager(game) {
|
|
|
|
BaseSoundManager.call(this, game);
|
2018-01-08 18:26:32 +00:00
|
|
|
},
|
|
|
|
add: function (key, config) {
|
|
|
|
var sound = new HTML5AudioSound(this, key, config);
|
|
|
|
this.sounds.push(sound);
|
|
|
|
return sound;
|
2018-01-08 18:25:11 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
module.exports = HTML5AudioSoundManager;
|