mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 17:28:18 +00:00
Merge pull request #6002 from rexrainbow/pack-loader-dotnotation-datakey
Can use dot notation as datakey
This commit is contained in:
commit
d53d8f3ea5
1 changed files with 6 additions and 2 deletions
|
@ -11,6 +11,7 @@ var EventEmitter = require('eventemitter3');
|
|||
var Events = require('./events');
|
||||
var FileTypesManager = require('./FileTypesManager');
|
||||
var GetFastValue = require('../utils/object/GetFastValue');
|
||||
var GetValue = require('../utils/object/GetValue');
|
||||
var PluginCache = require('../plugins/PluginCache');
|
||||
var SceneEvents = require('../scene/events');
|
||||
var XHRSettings = require('./XHRSettings');
|
||||
|
@ -603,9 +604,12 @@ var LoaderPlugin = new Class({
|
|||
addPack: function (pack, packKey)
|
||||
{
|
||||
// if no packKey provided we'll add everything to the queue
|
||||
if (packKey && pack.hasOwnProperty(packKey))
|
||||
if (packKey)
|
||||
{
|
||||
pack = { packKey: pack[packKey] };
|
||||
var subPack = GetValue(pack, packKey);
|
||||
if (subPack) {
|
||||
pack = { packKey: subPack };
|
||||
}
|
||||
}
|
||||
|
||||
var total = 0;
|
||||
|
|
Loading…
Reference in a new issue