SpritePayload Class |
Namespace: SpriteLibrary
public class SpritePayload
The SpritePayload type exposes the following members.
Name | Description | |
---|---|---|
SpritePayload | Initializes a new instance of the SpritePayload class |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
public class TankPayload : SpritePayload { public int Armor = 20; public int FireTime = 100; }
TankSprite.Payload = new TankPayload();
if(TankSprite.payload != null and TankSprite.payload is TankPayload) { TankPayload tPayload = (TankPayload)TankSprite.payload; tPayload.Armor--; }