Introduction The IgnoreAnimationChainTextureFlip property can be used to control whether a Sprite’s FlipHorizontal and FlipVertical values are changed by the current AnimationChain. This value defaults to true, meaning that a Sprite’s current AnimationChain will overwrite the Sprite’s FlipHorizontal and FlipVertical when the frame changes. In other words, if IgnoreAnimationChainTextureFlip is true (default value), and a[…]


Introduction The ForceUpdateDependencies for the Camera performs all of the same functionality as the PositionedObject’s ForceUpdateDependencies call, but it also does a few extra things. Specifically, it updates the mins and maxes of the camera, and recalculates its View and Project matrices. For information on ForceUpdateDependencies as it relates to PositionedObjects in general, see the[…]


Introduction This method converts all contained Sprites and PositionedModels to be manually-updated. This can be used to greatly improve performance of your game if your Scene does not have any kind of every-frame activity such as velocity, color rates, or attachments. This method can be called after the Scene is added to managers using AddToManagers.


Introduction The TopTextureCoordinate, BottomTextureCoodinate, LeftTextureCoordinate, and RightTextureCoordinate properties control the coordinates in “uv space” of the top, bottom, left, and right sides of the Sprite. In other words, these values can be used to make a Sprite draw part of a texture instead of the entire thing. These properties are often used when working on[…]


Introduction The MakeOneWay method makes the calling AttachbleList a one-way list. In other words, it means that the AttachableList will still contain all of the objects that it contained before calling MakeOneWay; however, the contained elements will no longer know that they belong to this List. This essentially makes the AttachableList behave like a regular[…]


Introduction Each Layer can have its own SortType which controls how Sprites, Text, and IDrawableBatches sort. This property allows each Layer to have its own Sort type. By default objects on Layers will be sorted by their Z values – objects with smaller Z values (which are in the distance) will draw behind objects which[…]


Introduction The CustomDestroy (if using Glue) and Destroy (if not using Glue) methods are called when the Screen is going to be removed from your game. This method should never be manually called – the ScreenManager will call this after the Screen’s IsActivityFinished property is set to true. The purpose of the CustomDestroy/Destroy methods is[…]


Introduction The Z property controls the absolute Z position of an object. On 3D cameras (Orthogonal=false) , the smaller the Z is, the further away from the camera an object will appear. For information on setting Z in Glue, see this page. Code Example The following example is performed in code, but using a Glue[…]

FlatRedBall.Graphics.Particle.Emitter:Particle Collision

Introduction Particles which are emitted by Emitters are fully-functional Sprites which means they have the full set of functionality. This article presents code which creates an Emitter, then adds collision to the emitted Sprites. Finally these emitted Sprites are collided against an AxisAlignedRectangle. Update The following example was written at a time when the SetCollision[…]


Introduction ManagedInvisible Sprites are Sprites which the SpriteManager performs every-frame updates on them (such as applying Velocity, Acceleration, and attachment logic). These Sprites are not drawn by the engine. For more information on managed invisible Sprites, see the AddManagedInvisibleSprite method. When to use ConvertToManagedInvisible The most common way of creating managed invisible Sprites is to[…]