Phaser API Documentation

  Version: 
group([children], [config])

Description:

Creates a new Group Game Object and adds it to the Scene.

Note: This method will only be available if the Group Game Object has been built into Phaser.

Parameters:

name type arguments description
children Array.<Phaser.GameObjects.GameObject> | Phaser.Types.GameObjects.Group.GroupConfig | Array.<Phaser.Types.GameObjects.Group.GroupConfig> <optional>

Game Objects to add to this Group; or the config argument.

config Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig <optional>

A Group Configuration object.

Returns:
Description:

The Game Object that was created.

Since: 3.0.0