SpriteAddAnimation Method (Image, Size) |
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 public void AddAnimation(
Image SpriteImage,
Size SpriteSize
)
Parameters
- SpriteImage
- Type: System.DrawingImage
The animation image to grab the frames from - SpriteSize
- Type: System.DrawingSize
The size of each frame
See Also