SpriteLibrary
SpriteLibrary
SpriteLibrary
Sprite Class
Sprite Methods
AddAnimation Method
AddAnimation Method (Image)
AddAnimation Method (Image, Size)
AddAnimation Method (Image, Int32)
AddAnimation Method (Int32, Int32)
AddAnimation Method (Image, Int32, Int32)
AddAnimation Method (Int32, Boolean, Boolean)
AddAnimation Method (Image, Int32, Int32, Int32)
AddAnimation Method (Point, Image, Int32, Int32, Int32, Int32)

Sprite AddAnimation Method (Image, Int32, Int32, Int32)

Add another animation to an existing Sprite. After you add animations, you can use ChangeAnimation to select which animation you want the specified sprite to show. For example, you may want to have Animation 0 be a guy walking left, and animation 1 is that same guy walking right. Because we do not specify the number of frames, it starts at the top-left corner and grabs as many frames as it can from the image.

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

    public void AddAnimation(
    	Image SpriteImage,
    	int width,
    	int height,
    	int duration
    )

#### Parameters

SpriteImage
  Type: System.Drawing
  Image
  The animation image to grab the frames from
width
  Type: System
  Int32
  The width of each frame
height
  Type: System
  Int32
  The height of each frame
duration
  Type: System
  Int32
  The time in milliseconds we use for each frame

See Also

#### Reference

Sprite Class
AddAnimation Overload
SpriteLibrary Namespace