C# Class geek.GameEngine.Sprites.AnimatedSprite

This is a game component that implements IUpdateable.
Inheritance: SpriteBase
Afficher le fichier Open project: impworks/xna.geek.engine Class Usage Examples

Méthodes publiques

Свойство Type Description
Looped bool

Méthodes publiques

Méthode Description
AnimatedSprite ( GameObject parent, Microsoft.Xna.Framework.Graphics.Texture2D tex, int frameCount, float frameRate ) : System
Draw ( SpriteBatch batch, bool disableLayering = false ) : void

Draws the current sprite frame to the screen.

GetTextureRegion ( Rectangle rect ) : Color[]

Get a portion of the current frame's texture as a sequence of colors.

Pause ( ) : void

Pauses the animation at current frame.

Reset ( ) : void

Reset the sprite.

SetFrame ( int frame ) : void

Sets the current frame.

Start ( ) : void

Start the animation.

Stop ( ) : void

Stops the animation and rewinds it to the first frame.

Update ( ) : void

Update the sprite.

Method Details

AnimatedSprite() public méthode

public AnimatedSprite ( GameObject parent, Microsoft.Xna.Framework.Graphics.Texture2D tex, int frameCount, float frameRate ) : System
parent geek.GameEngine.Visuals.GameObject
tex Microsoft.Xna.Framework.Graphics.Texture2D
frameCount int
frameRate float
Résultat System

Draw() public méthode

Draws the current sprite frame to the screen.
public Draw ( SpriteBatch batch, bool disableLayering = false ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Sprite batch.
disableLayering bool Whether to use layer ordering or not.
Résultat void

GetTextureRegion() public méthode

Get a portion of the current frame's texture as a sequence of colors.
public GetTextureRegion ( Rectangle rect ) : Color[]
rect Microsoft.Xna.Framework.Rectangle Rectangle to retrieve.
Résultat Color[]

Pause() public méthode

Pauses the animation at current frame.
public Pause ( ) : void
Résultat void

Reset() public méthode

Reset the sprite.
public Reset ( ) : void
Résultat void

SetFrame() public méthode

Sets the current frame.
public SetFrame ( int frame ) : void
frame int Frame id (0-based).
Résultat void

Start() public méthode

Start the animation.
public Start ( ) : void
Résultat void

Stop() public méthode

Stops the animation and rewinds it to the first frame.
public Stop ( ) : void
Résultat void

Update() public méthode

Update the sprite.
public Update ( ) : void
Résultat void

Property Details

Looped public_oe property

The flag indicating whether animation should loop after it has finished, or display the last frame until it's changed.
public bool Looped
Résultat bool