int BodyCount { get; set; }

robot_2Generated
code_blocksInput

Description

Returns the number of physics bodies that belong to this PhysicsGroup. This property provides a quick way to determine how many bodies are currently part of the group, which can be useful for managing and iterating over the bodies within the group.

Usage

To access the BodyCount property, you need to have an instance of a PhysicsGroup. You can then simply access the property to get the number of bodies:

Example

PhysicsGroup myPhysicsGroup = new PhysicsGroup();
int numberOfBodies = myPhysicsGroup.BodyCount;
// Use numberOfBodies as needed, for example, to iterate over bodies or perform checks.