Method AddFrame
AddFrame(int, TimeSpan)
Adds a new frame of animation to the Animation
Parameters
regionIndex
intThe index of the source Texture
Region in the TextureAtlas of the SpriteSheet .duration
TimeSpan The duration of the frame of animation.
Returns
- Animation
Tag Builder This instance of the Animation
Tag class.Builder
Exceptions
- Argument
Out OfRange Exception Throw if the specified index is less than zero or is greater than or equal to the total number of regions in the Texture
Atlas .
AddFrame(string, TimeSpan)
Adds a new frame of animation to the Animation
Parameters
regionName
stringThe name of the source Texture
Region in the TextureAtlas of the SpriteSheet .duration
TimeSpan The duration of the frame of animation.
Returns
- Animation
Tag Builder This instance of the Animation
Tag class.Builder
Exceptions
- Key
Not Found Exception Thrown if the Texture
Atlas of the SpriteSheet does not contain a TextureRegion with the specified name.