Click or drag to resize
SpriteAddAnimation Method
Overload List
  NameDescription
Public methodAddAnimation(Image)
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.
Public methodAddAnimation(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.
Public methodAddAnimation(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.
Public methodAddAnimation(Int32, Int32)
Duplicate an animation, except rotated by the specified number of degrees. For example, if you have a single animation (0), and you want to rotate it by 90 degrees, it will create animation 1 with that rotation to it. In the long haul, generating a few rotated animations is less memory intensive than rotating it on demand.
Public methodAddAnimation(Image, 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.
Public methodAddAnimation(Int32, Boolean, Boolean)
Duplicate an animation, except rotated by the specified number of degrees. For example, if you have a single animation (0), and you want to rotate it by 90 degrees, it will create animation 1 with that rotation to it. In the long haul, generating a few rotated animations is less memory intensive than rotating it on demand using the MirrorHorizontally or MirrorVertically booleans.
Public methodAddAnimation(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.
Public methodAddAnimation(Point, Image, Int32, 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.
Top
See Also