arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

AxisAlignedRectangles

hashtag
Introduction

The AxisAlignedRectangles property is a property of type PositionedObjectListarrow-up-right. Therefore, you can use this member the same way you would use a PositionedObjectList<AxisAlignedRectangle>.

hashtag
Code Example

The following shows how to loop through all rectangles in a ShapeCollection and perform collision between the rectangles and a Circle named CircleInstance:

for(int i = 0; i < ShapeCollectionInstance.AxisAlignedRectangles.Count; i++)
{
    circle.CollideAgainstMove(ShapeCollectionInstance.AxisAlignedRectangles[i], 0, 1);
}