mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
Don't discard config
This commit is contained in:
parent
70b8bfe4b0
commit
6f3c0d2bb8
1 changed files with 3 additions and 6 deletions
|
@ -56,7 +56,7 @@ var PhysicsGroup = new Class({
|
||||||
}
|
}
|
||||||
else if (Array.isArray(children) && IsPlainObject(children[0]))
|
else if (Array.isArray(children) && IsPlainObject(children[0]))
|
||||||
{
|
{
|
||||||
// children is an array of plain objects
|
// children is an array of plain objects (i.e., configs)
|
||||||
config = children[0];
|
config = children[0];
|
||||||
|
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
@ -66,6 +66,8 @@ var PhysicsGroup = new Class({
|
||||||
singleConfig.internalCreateCallback = _this.createCallbackHandler;
|
singleConfig.internalCreateCallback = _this.createCallbackHandler;
|
||||||
singleConfig.internalRemoveCallback = _this.removeCallbackHandler;
|
singleConfig.internalRemoveCallback = _this.removeCallbackHandler;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
children = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -140,11 +142,6 @@ var PhysicsGroup = new Class({
|
||||||
setImmovable: GetFastValue(config, 'immovable', false)
|
setImmovable: GetFastValue(config, 'immovable', false)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Array.isArray(children))
|
|
||||||
{
|
|
||||||
config = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Group.call(this, scene, children, config);
|
Group.call(this, scene, children, config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue