SpriteLibrary
SpriteLibrary
SpriteLibrary
Sprite Class
Sprite Fields
CannotMoveOutsideBox Field
MirrorHorizontally Field
MirrorVertically Field
MovementSpeed Field
payload Field

# Sprite Fields

The Sprite type exposes the following members.

Fields

| Name | Description
--- | --- | ---
| CannotMoveOutsideBox | Determine if the sprite will automatically move outside the box. If not, it will hit the side of the box and stick
| MirrorHorizontally | Flip the image when it gets printed. If your sprite is walking left, flipping it will make it look like it is going right. This works great for many things. But, if your program is gobbling memory or CPU, you may need to consider using Sprite.AddAnimation
| MirrorVertically | Flip the image when it gets printed. If your sprite looks like it is facing up, doing this will make it look like it faces down. This works great for many things. But, if your program is gobbling memory or CPU, you may need to consider using Sprite.AddAnimation
| MovementSpeed | The movement speed of the sprite. To make a Sprite move, you need to set the MovementSpeed, the direction (using SetSpriteDirection(Vector), SetSpriteDirectionToPoint(Point), SetSpriteDirectionRadians(Double), or SetSpriteDirectionDegrees(Double)), and the AutomaticallyMoves property. The speed is calculated in pixels per amount of time. A higher number is faster than a lower number.
| payload | A SpritePayload is an object that can be placed along with a Sprite which can hold custom data. For example, you may want to use it to hold information pertaining to how much damage a particular sprite has taken. Each Sprite should have its own Payload, so you can track specific information about the individual sprite.

Top
See Also

#### Reference

Sprite Class
SpriteLibrary Namespace