Метод | Описание | |
---|---|---|
Animation ( Microsoft.Xna.Framework.Graphics.Texture2D spriteSheet, |
Initialises an Animation object specifies a SpriteSheet to us and the individual frame locations within the sheet the use. Optionally, the Delay between Frame changes and whether the animation should loop when complete can be passed as constructor parameters.
|
|
GetFrame ( double elapsedMS ) : |
Returns the Current Frame to show in the sprite sheet based on the current games running time.
|
|
GetFrameIndex ( double elapsedMS ) : int |
Returns the current Frame Index as an integer value based on the GameTime parameters passed into this method.
|
|
GetSourceRectangle ( double elapsedMS ) : Rectangle? | ||
GetSourceTexture ( double elapsedMS ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
IsFinished ( double elapsedMS ) : bool |
Specifies whether the Animation has completed. If the Animation is of Looping type, then this method will always return a true. For non-looping animations, this method should return a true once it has passed its last frame. The GameTime parameter is required to determine its current position based on the current GameTime.
|
|
ToString ( ) : string |
public Animation ( Microsoft.Xna.Framework.Graphics.Texture2D spriteSheet, |
||
spriteSheet | Microsoft.Xna.Framework.Graphics.Texture2D | Texture2D object that represents the SpriteSheet to use for this animation. |
frames | Array of Rectangle objects that specify the locations in the spritesheet to use as frames. | |
frameDelay | int | |
loop | bool | bool value specifying wheter the animation should re-start at the end of the animation frames. Defaults to false. |
Результат | System |
public GetFrame ( double elapsedMS ) : |
||
elapsedMS | double | |
Результат |
public GetFrameIndex ( double elapsedMS ) : int | ||
elapsedMS | double | |
Результат | int |
public GetSourceRectangle ( double elapsedMS ) : Rectangle? | ||
elapsedMS | double | |
Результат | Rectangle? |
public GetSourceTexture ( double elapsedMS ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
elapsedMS | double | |
Результат | Microsoft.Xna.Framework.Graphics.Texture2D |
public IsFinished ( double elapsedMS ) : bool | ||
elapsedMS | double | |
Результат | bool |