Click or drag to resize

Sprite Fields

The Sprite type exposes the following members.

Fields
  NameDescription
Public fieldCannotMoveOutsideBox
Determine if the sprite will automatically move outside the box. If not, it will hit the side of the box and stick
Public fieldMirrorHorizontally
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
Public fieldMirrorVertically
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
Public fieldMovementSpeed
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.
Public fieldCode examplepayload
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