Group
arcade.Group (Class)
Implements: Collidable
A Group is a container for multiple physics bodies. Groups can be used for efficient collision detection between sets of bodies.
Instance Members
Array of Body objects contained in this group.
The sorting direction for bodies in this group.
Adds a body to this group.
Name | Type | Description |
---|---|---|
body |
Body | The body to add to the group. |
Removes a body from this group.
Name | Type | Description |
---|---|---|
body |
Body | The body to remove from the group. |
Sorts the bodies in this group from left to right based on their x position.
Sorts the bodies in this group from right to left based on their x position.
Sorts the bodies in this group from top to bottom based on their y position.
Sorts the bodies in this group from bottom to top based on their y position.