FlatRedBall.Math.PositionedObjectList.GetFirstAfterPosition

Introduction GetFirstAfterPosition is obsolete. The upper bound for GetFirstAfterPosition is inclusive. GetFirstAfter uses an exclusive upper bound to match other range-accepting methods in C#. Please use FlatRedBall.Math.PositionedObjectList.GetFirstAfter.

FlatRedBall.Math.PositionedObjectList.AttachTo

Introduction The AttachTo method is a shortcut method for attaching all contained elements in the list to the argument. The method’s contents are as follows: public void AttachTo(PositionedObject newParent, bool changeRelative) { for (int i = 0; i < Count; i++) { this[i].AttachTo(newParent, changeRelative); } } For more information on the AttachTo method, see the[…]

GrabbedPositionedObject

GrabbedPositionedObject The Mouse class provides functionality for grabbing and moving any object which implements the PositionedObject class. This includes common FlatRedBall types like Sprite and Text, as well as entities created in Glue. The following code creates 9 Sprites and allows the user to click and drag to control the Sprites. This code can be added to[…]

FlatRedBall.Math.PositionedObjectList

Introduction The PositionedObjectList is an object which can store lists of PositionedObjects. It is the base class of the SpriteList class and is commonly used to store lists of Entities and shapes such as Polygons. The PositionedObjectList inherits from the AttachableList and it establishes two-way relationships with objects that are added to it. Common Usage[…]

PositionedObject

Introduction The PositionedObject is an object which contains properties and functionality for position, rotation, attachment, velocity, acceleration, and instructions. It serves as the base object for common FlatRedBall classes such as the Camera, Sprite, Emitter, and Text objects. The PositionedObject is also the base class of Entities so if you are using Glue you will[…]

RelativeRotationZ

Introduction The RelativeRotationZ property controls the rotation of a PositionedObject relative to its parent. If an object does not have a parent (is not attached), RelativeRotationZ will not impact the final rotation of an object. If an object is attached, then RotationZ becomes read-only, and RelativeRotationZ controls the rotation of the object relative to its[…]

Entity Performance

Introduction The Entity Performance tab provides options for improving the runtime performance (reducing CPU usage) for an entity. This tab is only needed for games which include a very large number of entities (typically many hundreds or thousands of instances). Common types of entities which benefit from this tab are enemies and bullets. Entity Performance[…]

RenderTargetSprite

Introduction The RenderTargetSprite class provides a simple way to perform rendering using a RenderTarget2D. Although FlatRedBall provides support for using MonoGame render targets, the RenderTargetSprite simplifies the creation and management of render targets. RenderTargetSprite instances provide a FlatRedBall Layer for adding visual objects to the sprite. RenderTargetSprite Concepts To understand how a RenderTargetSprite works, we can[…]

RotationZ

Introduction RotationZ is the rotation value of the positioned object along the Z axis. For most games this value is used to rotate an object such as a car in a top-down game, or a spinning particle. RotationZ is represented in radians. Although RotationZ is a property on all PositionedObjects, the Circle and AxisAlignedRectangle objects[…]

RemoveFromManagers

Introduction RemoveFromManagers removes all contained tiles from any managers and other PositionedObjectLists that hold the tiles. Specifically calling RemoveFromManagers will: Remove all shapes from the ShapeManager for every-frame management Remove all shapes from the ShapeManager for rendering Clear the TileShapeCollection Remove shapes in the TileShapeCollection from any other PositionedObjectList containing these shapes, including parent/child relationships[…]