Click or drag to resize

SpriteInfo Class

A class which is used by the SpriteDatabase to build Sprites. You should not need to use this in your programming. It is simplest to use the Load/Save features of the SpriteDatabase, which will load and save the SpriteInfo. Again, you do not want to use these within your program. Let the SpriteDatabase use this. The reason these are visible to the program is because This code uses "XML Serialization" to load and save. XML Serialization requires the items you are serializing to be "public", which makes them visible.
Inheritance Hierarchy
SystemObject
  SpriteLibrarySpriteInfo

Namespace:  SpriteLibrary
Assembly:  SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.6 (1.0.0.6)
Syntax
C#
public class SpriteInfo

The SpriteInfo type exposes the following members.

Constructors
  NameDescription
Public methodSpriteInfo
Initializes a new instance of the SpriteInfo class
Top
Methods
  NameDescription
Public methodClone
A generic cloning method that works when everything is public
Public methodCopyFrom
Update the current SpriteInfo class such that it is identical to the class you are copying from.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Fields
  NameDescription
Public fieldAnimations
This is the list of animations that make up the sprite. Again, you do not want to use these within your program. Let the SpriteDatabase use this. The reason these are visible to the program is because This code uses "XML Serialization" to load and save. XML Serialization requires the items you are serializing to be "public", which makes them visible.
Public fieldSpriteName
The name of the sprite. It should be unique within your application
Public fieldViewPercent
The percentage size when the sprite is normally displayed. For example: If the image you drew your sprite on has your sprite drawn on a 200x200 grid, but you want your sprite to normally be 100x100, you would tell it to be 50 (50 percent of the original size).
Top
See Also