mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Implemented add method for HTML5AudioSoundManager class
This commit is contained in:
parent
df450a4e17
commit
197e370c7b
1 changed files with 6 additions and 0 deletions
|
@ -1,9 +1,15 @@
|
|||
var Class = require('../../utils/Class');
|
||||
var BaseSoundManager = require('../BaseSoundManager');
|
||||
var HTML5AudioSound = require('./HTML5AudioSound');
|
||||
var HTML5AudioSoundManager = new Class({
|
||||
Extends: BaseSoundManager,
|
||||
initialize: function HTML5AudioSoundManager(game) {
|
||||
BaseSoundManager.call(this, game);
|
||||
},
|
||||
add: function (key, config) {
|
||||
var sound = new HTML5AudioSound(this, key, config);
|
||||
this.sounds.push(sound);
|
||||
return sound;
|
||||
}
|
||||
});
|
||||
module.exports = HTML5AudioSoundManager;
|
||||
|
|
Loading…
Add table
Reference in a new issue