Click or drag to resize
SpriteLibrary Namespace
SpriteLibrary is a .net graphical library for creating and controlling sprites on a PictureBox. A sprite is an animated image that can be moved around on a picturebox. You can give the sprite an initial location, and either move it around manually or give it specific movement controls. To use this library, you will need to add a reference to it in your project. You will also need a reference to "Windows Base." In the solution explorer, if you right-click your project and go to "add", and then "reference" and click "WindowsBase" towards the bottom. On that same window, on the left, click "browse." Then, click the "Browse..." button and find the sprite-library dll. The main places to find the SpriteLibrary and sample programs using this SpriteLibrary are here: http://www.codeproject.com/Articles/1085446/Using-Sprites-Inside-Windows-Forms and http://tyounglightsys.ddns.info/SpriteLibrary
Classes
  ClassDescription
Public classSprite
A Sprite is an animated image that has a size, position, rotation, and possible vector It tracks where in the animation sequence it is, can report colisions, etc. This SpriteController draws, moves, and deals with most graphical aspects of the sprites for you.
Public classCode exampleSpriteController
A sprite controller is the main heart of the sprite class. Each SpriteController manages one picturebox. If at all possible, try to keep each game in one picturebox, and try to avoid making and destroying new forms with SpriteController/pictureboxes in them. It is hard to destroy them completely.
Public classSpriteEventArgs
An EventArgs that contains information about Sprites. Most of the Sprite events use this SpriteEventArgs.
Public classCode exampleSpritePayload
The SpritePayload is a stub of a class, for storing user-defined data and functions along with a sprite.
Structures
  StructureDescription
Public structureSpriteAdjustmentRatio
A structure that contains the width and height adjustment ratio. Use this if you need to manually calculate positions between the PictureBox that the sprite is in, and the Background Image itself.
Delegates
  DelegateDescription
Public delegateSpriteSpriteEventHandler
A delegate that has a SpriteEventArgs instead of EventArgs. Used for most of the Sprite events. This allows us to pass more information from sprite events than a basic EventArgs allows for
Public delegateSpriteKeyEventHandler
This is a delegate for a keypress event.
Enumerations
  EnumerationDescription
Public enumerationSpriteCollisionMethod
The various types of collisions a sprite can have. Currently only rectangle works. The other types were added when I thought the different types of collision types were needed. Someday we may add these if we find they are useful, or if someone else decides they want to help program the SpriteLibrary. These values are primarily used in Sprite Events
Public enumerationSpritePauseType
The type of pause signals you can give a sprite or the sprite controller