C# Class MrGravity.AnimatedSprite

Exibir arquivo Open project: DizWARE/Mr-Gravity Class Usage Examples

Public Properties

Property Type Description
PreviousFrame int

Public Methods

Method Description
Draw ( SpriteBatch spriteBatch, Vector2 position ) : void

Draw function - self explanatory

Load ( Microsoft.Xna.Framework.Content.ContentManager content, string name, int frameCount, float fps ) : void

Loads function - self explanatory

Reset ( ) : void

Reset function - Resets the frames and elapsed time to zero

Update ( float elapsed ) : void

Update function - self explanatory

Method Details

Draw() public method

Draw function - self explanatory
public Draw ( SpriteBatch spriteBatch, Vector2 position ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch the spritebatch to draw
position Microsoft.Xna.Framework.Vector2 where you want the texture to be drawn
return void

Load() public method

Loads function - self explanatory
public Load ( Microsoft.Xna.Framework.Content.ContentManager content, string name, int frameCount, float fps ) : void
content Microsoft.Xna.Framework.Content.ContentManager The current content manager
name string Name of the asset - assumes the animatedSprites folder
frameCount int number of frames
fps float Frames Per Second
return void

Reset() public method

Reset function - Resets the frames and elapsed time to zero
public Reset ( ) : void
return void

Update() public method

Update function - self explanatory
public Update ( float elapsed ) : void
elapsed float elapsed time - if calling in MrGravityMain use (float)gameTime.ElapsedGameTime.TotalSeconds
return void

Property Details

PreviousFrame public_oe property

public int PreviousFrame
return int