mirror of
https://github.com/photonstorm/phaser
synced 2025-02-25 11:57:19 +00:00
Fix no children created from GroupCreateConfig[] (multiple adds)
Fixes #3612
This commit is contained in:
parent
8bdeb69716
commit
66f1ff848e
1 changed files with 7 additions and 3 deletions
|
@ -239,7 +239,7 @@ var Group = new Class({
|
|||
*/
|
||||
this.createMultipleCallback = GetFastValue(config, 'createMultipleCallback', null);
|
||||
|
||||
if (config && config.key !== undefined)
|
||||
if (config)
|
||||
{
|
||||
this.createMultiple(config);
|
||||
}
|
||||
|
@ -299,8 +299,7 @@ var Group = new Class({
|
|||
*
|
||||
* If the group becomes {@link Phaser.GameObjects.Group#isFull}, no further Game Objects are created.
|
||||
*
|
||||
* Calls {@link Phaser.GameObjects.Group#createMultipleCallback}
|
||||
* and {@link Phaser.GameObjects.Group#createCallback}.
|
||||
* Calls {@link Phaser.GameObjects.Group#createMultipleCallback} and {@link Phaser.GameObjects.Group#createCallback}.
|
||||
*
|
||||
* @method Phaser.GameObjects.Group#createMultiple
|
||||
* @since 3.0.0
|
||||
|
@ -321,6 +320,11 @@ var Group = new Class({
|
|||
config = [ config ];
|
||||
}
|
||||
|
||||
if (config[0].key === undefined)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
var output = [];
|
||||
|
||||
for (var i = 0; i < config.length; i++)
|
||||
|
|
Loading…
Add table
Reference in a new issue