메소드 | 설명 | |
---|---|---|
Animation ( Microsoft.Xna.Framework.Graphics.Texture2D spriteSheet, int spriteSheetRow, int framePixelWidth, int framePixelHeight, int framesLength, int frameDuration, bool flipHorizontally = false ) : System |
Creates a new Animation instance.
|
|
Draw ( |
Draw the current frame.
|
|
Reset ( ) : void |
Resets the animation to the initial frame.
|
|
Update ( |
Updates the current frame of the animation.
|
public Animation ( Microsoft.Xna.Framework.Graphics.Texture2D spriteSheet, int spriteSheetRow, int framePixelWidth, int framePixelHeight, int framesLength, int frameDuration, bool flipHorizontally = false ) : System | ||
spriteSheet | Microsoft.Xna.Framework.Graphics.Texture2D | The source sprite sheet containing the row of frames to animate. |
spriteSheetRow | int | The row in the sprite sheet containing the frames to animate. |
framePixelWidth | int | The width in pixels of each frame in the row. |
framePixelHeight | int | The height in pixel of each frame in the row. |
framesLength | int | The number of frames in the row. |
frameDuration | int | The time, in milliseconds, to display each frame. |
flipHorizontally | bool | A flag specifying whether to flip the animation horizontally (e.g., to turn an animation facing the right into a left-facing animation). |
리턴 | System |
public Draw ( |
||
spriteBatch | The SpriteBatch in which to draw. | |
position | Vector2 | The position at which to draw. |
scale | float | The scale at which to draw. |
리턴 | void |
public Update ( |
||
gameTime | ||
리턴 | void |