Click or drag to resize
SpriteAddAnimation Method (Image, 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#
public void AddAnimation(
	Image SpriteImage,
	int duration
)

Parameters

SpriteImage
Type: System.DrawingImage
The animation image to grab the frames from
duration
Type: SystemInt32
The duration the single frame uses before refreshing. 1000 is a good number.
See Also