githubEdit

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 ShapeManagerarrow-up-right.

Simple Circle Example

The following example creates two circles and controls one of them with the Keyboardarrow-up-right.

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?