Version
Description
If you pass an array of config objects as the children argument to add.physics.group() or new Phaser.Physics.Arcade.Group(), only the first config is used.
Example Test Code
Compare
this.add.group([
{ key: 'veg', frame: 0, setXY: { x: 0, y: 0 } },
{ key: 'veg', frame: 1, setXY: { x: 0, y: 32 } },
{ key: 'veg', frame: 2, setXY: { x: 0, y: 64 } },
]); // -> 3 sprites are created
and
this.physics.add.group([
{ key: 'veg', frame: 0, setXY: { x: 0, y: 0 } },
{ key: 'veg', frame: 1, setXY: { x: 0, y: 32 } },
{ key: 'veg', frame: 2, setXY: { x: 0, y: 64 } },
]); // -> 1 sprite is created
Additional Information
I think the problem is in https://github.com/photonstorm/phaser/blob/9e4d0ade2bfe6c6ec9e87ab65a57d05dd1b64332/src/physics/arcade/PhysicsGroup.js#L67-L81
Version
Description
If you pass an array of config objects as the
childrenargument toadd.physics.group()ornew Phaser.Physics.Arcade.Group(), only the first config is used.Example Test Code
Compare
and
Additional Information
I think the problem is in https://github.com/photonstorm/phaser/blob/9e4d0ade2bfe6c6ec9e87ab65a57d05dd1b64332/src/physics/arcade/PhysicsGroup.js#L67-L81