mirror of
https://github.com/wassname/phaser.git
synced 2026-07-05 17:30:19 +08:00
SoundManager converted and playing audio :)
This commit is contained in:
@@ -41,6 +41,16 @@ Phaser.GameObjectFactory.prototype = {
|
||||
|
||||
return this.game.tweens.create(obj, localReference);
|
||||
|
||||
},
|
||||
|
||||
audio: function (key, volume, loop) {
|
||||
|
||||
volume = volume || 1;
|
||||
loop = loop || false;
|
||||
|
||||
return this.game.sound.add(key, volume, loop);
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user