ShapeCollection
Last updated
Last updated
The FlatRedBall Editor supports creating objects of type ShapeCollection.
Note that entities which are created as ICollidable automatically have a ShapeCollection named Collision, and all shapes shapes are added to the default Collision shape collection. In this case you do not need to manually create a ShapeCollection. For more information, see the Implements ICollidable page.
To add a ShapeCollection:
Right-click on Objects under a Screen or Entity
Select Add Object
Verify that FlatRedBall or Custom Type is selected.
Select ShapeCollection
Click OK
Note that FlatRedBall also supports the .shcx file format, but this is no longer recommended. The PolygonEditor tool is no longer maintained, and the recommended approach is to add a ShapeCollection as shown above and to modify the shapes using FlatRedBall's LiveEdit.
ShapeCollections can have shapes added manually. The ShapeCollection serves as a "list" of shapes, but unlike normal lists, the ShapeCollection can contain multiple types of objects.
To add a new shape to the ShapeCollection:
Right-click on the ShapeCollection instance
Select Add Object
Select one of the shapes - notice that FlatRedBall filters the available types to the types allowed in a ShapeCollection.
Click OK
Your newly-created shape is added to ShapeCollection in the tree view.
For information on how to work with a ShapeCollection in code, see the ShapeCollection page.