SpriteControllerSpriteFromName Method |
Find a sprite that has a specified name. This returns the actual sprite with that name.
You usually want to use DuplicateSprite(Name) to clone the sprite and get one you can
destroy. If you destroy a named sprite without duplicating it, you may end up losing
it for the remainder of the program.
Namespace:
SpriteLibrary
Assembly:
SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.5 (1.0.0.5)
Syntaxpublic Sprite SpriteFromName(
string Name
)
Parameters
- Name
- Type: SystemString
A string that matches something added to a sprite with Sprite.SetName
Return Value
Type:
SpriteA sprite that has the specified name, or null if no such sprite exists.
See Also