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.
Namespace:
SpriteLibrary
Assembly:
SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.6 (1.0.0.6)
Syntax
Examples
A Sprite can hold a payload. Use this to store extra information about the various Sprites. Health, Armor,
Shoot time, etc. But, to store information in the payload, you need to make a new class of SpritePayload. The syntax
for doing so is:
public class TankPayload : SpritePayload
{
public int Armor;
public int Speed;
}
You can access the payload and retrieve the various values.
See Also