mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Add children after configuration
Ensures the create handler is called
This commit is contained in:
parent
d6e8600766
commit
70b8bfe4b0
1 changed files with 6 additions and 1 deletions
|
@ -91,7 +91,7 @@ var Group = new Class({
|
|||
* @type {Phaser.Structs.Set.<Phaser.GameObjects.GameObject>}
|
||||
* @since 3.0.0
|
||||
*/
|
||||
this.children = new Set(children);
|
||||
this.children = new Set();
|
||||
|
||||
/**
|
||||
* A flag identifying this object as a group.
|
||||
|
@ -236,6 +236,11 @@ var Group = new Class({
|
|||
*/
|
||||
this.internalRemoveCallback = GetFastValue(config, 'internalRemoveCallback', null);
|
||||
|
||||
if (children)
|
||||
{
|
||||
this.addMultiple(children);
|
||||
}
|
||||
|
||||
if (config)
|
||||
{
|
||||
this.createMultiple(config);
|
||||
|
|
Loading…
Add table
Reference in a new issue