mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
Creating AudioFile in audio loader method and adding it if it's not null
Returning loader reference for call chaining
This commit is contained in:
parent
8de108ce68
commit
8dc987b7fc
1 changed files with 8 additions and 1 deletions
|
@ -94,7 +94,14 @@ var Loader = new Class({
|
||||||
// config can include: instances
|
// config can include: instances
|
||||||
audio: function (key, urls, config, xhrSettings)
|
audio: function (key, urls, config, xhrSettings)
|
||||||
{
|
{
|
||||||
return AudioFile.create(this, key, urls, config, xhrSettings);
|
var audioFile = AudioFile.create(this, key, urls, config, xhrSettings);
|
||||||
|
|
||||||
|
if(audioFile)
|
||||||
|
{
|
||||||
|
this.addFile(audioFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
tilemapCSV: function (key, url, xhrSettings)
|
tilemapCSV: function (key, url, xhrSettings)
|
||||||
|
|
Loading…
Reference in a new issue