Click or drag to resize

SpriteDestroy Method

Tell the sprite to kill itself. It will erase itself and then be removed from the SpriteList

Namespace:  SpriteLibrary
Assembly:  SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.6 (1.0.0.6)
Syntax
C#
public void Destroy()
Examples
Tell the sprite to kill itself. It will erase itself and then be removed from the spritelist. Then it will be gone forever. Sort-of. You see, so long as you still have a variable that has the sprite, that variable will still be able to reference the Sprite. The Destroying value will say that it is trying to be destroyed, but you can still accidentally do something. You really want to set your variables to null once you destroy something:
MySprite.Destroy();
MySprite = null;
See Also