For the complete documentation index, see llms.txt. This page is also available as Markdown.

Circle

Introduction

The Circle represents a PositionedObject which can be used to draw circles or conduct efficient circular collision. Circles are created and removed through the ShapeManager.

Simple Circle Example

The following example creates two circles and controls one of them with the Keyboard.

Add the following using statement

using FlatRedBall.Math.Geometry;
using FlatRedBall.Input;

At Class Scope:

Circle controlledCircle;
Circle idleCircle;

In Initialize:

controlledCircle = ShapeManager.AddCircle();
controlledCircle.Radius = 8;
controlledCircle.X = 64;

idleCircle = ShapeManager.AddCircle();
idleCircle.Radius = 24;

In Update:

TwoCirclesOverlapping.png

Last updated

Was this helpful?