SpriteLibrary
SpriteLibrary
SpriteLibrary
SpriteController Class
SpriteController Constructor
SpriteController Constructor (PictureBox)
SpriteController Constructor (PictureBox, SpriteDatabase)
SpriteController Constructor (PictureBox, EventHandler)

# SpriteController Constructor (PictureBox, EventHandler)

Create a sprite controller, specifying the picturebox on which the sprites will be displayed.

Namespace: SpriteLibrary
Assembly: SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.6 (1.0.0.6)
Syntax
C#
Copy

    public SpriteController(
    	PictureBox Area,
    	EventHandler TimerTickMethod
    )

#### Parameters

Area
  Type: System.Windows.Forms
  PictureBox
  The picturebox that the sprites will be drawn in
TimerTickMethod
  Type: System
  EventHandler
  A function on the form that you want to have run every tick

Examples
This is an example of a Form class that defines a SpriteController. The MainDrawingArea is a PictureBox. While defining the SpriteController, we are also setting a function used for the DoTick. event.
C#
Copy

    public partial class ShootingFieldForm : Form
    {
        public ShootingFieldForm()
        {
            InitializeComponent();
            MainDrawingArea.BackgroundImage = Properties.Resources.Background;
            MainDrawingArea.BackgroundImageLayout = ImageLayout.Stretch;
            MySpriteController = new SpriteController(MainDrawingArea, CheckForKeyPress);
        }

        private void CheckForKeyPress(object sender, EventArgs e)
        {
            //Do stuff here
        }
    }

See Also

#### Reference

SpriteController Class
SpriteController Overload
SpriteLibrary Namespace