SpriteLibrary
SpriteLibrary
SpriteLibrary
Sprite Class
Sprite Methods
AddAnimation Method
AnimateJustAFewTimes Method
AnimateOnce Method
CancelMoveTo Method
ChangeAnimation Method
ChangeAnimationSpeed Method
ChangeFrameAnimationSpeed Method
CheckSpriteHitsSprite Method
ConvertDegreesToRadians Method
ConvertRadiansToDegrees Method
Destroy Method
GetAnimationSpeed Method
GetFrameAnimationSpeed Method
GetImage Method
GetSpriteBaseImageCenter Method
GetSpriteDegrees Method
GetSpritePictureboxCenter Method
GetSpriteRadans Method
GetSpriteVector Method
HideSprite Method
IsPaused Method
MoveTo Method
Pause Method
PutBaseImageLocation Method
PutPictureBoxLocation Method
RecalcPictureBoxLocation Method
ReplaceImage Method
ReturnAdjustmentRatio Method
SendToBack Method
SendToFront Method
SetName Method
SetSize Method
SetSpriteDirection Method
SetSpriteDirectionDegrees Method
SetSpriteDirectionRadians Method
SetSpriteDirectionToPoint Method
SpriteAdjustedPoint Method
SpriteAtImagePoint Method
SpriteAtPictureBoxPoint Method
SpriteCanMoveOnImage Method
SpriteCanMoveOnPictureBox Method
SpriteIntersectsRectangle Method
UnhideSprite Method
UnPause Method

# Sprite Destroy 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#
Copy

    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:
Copy

    MySprite.Destroy();
    MySprite = null;

See Also

#### Reference

Sprite Class
SpriteLibrary Namespace