group(parent, name, addToStage, enableBody, physicsBodyType) → {Phaser.Group}
A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
parent | any | The parent Group or DisplayObjectContainer that will hold this group, if any. | ||
name | string | <optional> | 'group' | A name for this Group. Not used internally but useful for debugging. |
addToStage | boolean | <optional> | false | If set to true this Group will be added directly to the Game.Stage instead of Game.World. |
enableBody | boolean | <optional> | false | If true all Sprites created with |
physicsBodyType | number | <optional> | 0 | If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc. |
Returns
The newly created Group.
- Source code: gameobjects/GameObjectCreator.js (Line 83)
Please login to continue.