C# Class MrGravity.AnimatedSprite

Afficher le fichier Open project: DizWARE/Mr-Gravity Class Usage Examples

Méthodes publiques

Свойство Type Description
PreviousFrame int

Méthodes publiques

Méthode 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 méthode

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
Résultat void

Load() public méthode

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
Résultat void

Reset() public méthode

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

Update() public méthode

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

Property Details

PreviousFrame public_oe property

public int PreviousFrame
Résultat int