C# Class WaveEngine.Components.Animation.Animation2D

Inheritance: AnimationBase
Afficher le fichier Open project: WaveEngine/Components Class Usage Examples

Private Properties

Свойство Type Description
HandleEndAnimation void
HandleKeyFrameEvents void

Méthodes publiques

Méthode Description
Animation2D ( ) : System

Initializes a new instance of the Animation2D class.

PlayAnimation ( string name, int startFrame, int endFrame, bool loop = true, bool backwards = false ) : void

Plays the animation between the specified frames.

PlayAnimation ( string name, int startFrame, int endFrame, bool loop = true, bool backwards = false, int framesPerSecond = null ) : void

Plays the animation between the specified frames.

ResumeAnimation ( ) : void

Resume the animation.

SetFrame ( int frame ) : void

Sets the frame for the current active animation.

StopAnimation ( ) : void

Stops the animation.

Méthodes protégées

Méthode Description
DefaultValues ( ) : void

Sets the default values

Initialize ( ) : void

Initialzie the component

Update ( TimeSpan gameTime ) : void

Updates the animation.

Private Methods

Méthode Description
HandleEndAnimation ( ) : void

Handle End animation

HandleKeyFrameEvents ( ) : void

Handle key frame events

Method Details

Animation2D() public méthode

Initializes a new instance of the Animation2D class.
public Animation2D ( ) : System
Résultat System

DefaultValues() protected méthode

Sets the default values
protected DefaultValues ( ) : void
Résultat void

Initialize() protected méthode

Initialzie the component
protected Initialize ( ) : void
Résultat void

PlayAnimation() public méthode

Plays the animation between the specified frames.
public PlayAnimation ( string name, int startFrame, int endFrame, bool loop = true, bool backwards = false ) : void
name string The name of the animation.
startFrame int The frame where the animation starts playing.
endFrame int The last frame of the animation to play.
loop bool if set to true loop the animation.
backwards bool if set to true play the animation backwards.
Résultat void

PlayAnimation() public méthode

Plays the animation between the specified frames.
public PlayAnimation ( string name, int startFrame, int endFrame, bool loop = true, bool backwards = false, int framesPerSecond = null ) : void
name string The name of the animation.
startFrame int The frame where the animation starts playing.
endFrame int The last frame of the animation to play.
loop bool if set to true loop the animation.
backwards bool if set to true play the animation backwards.
framesPerSecond int The frames per second.
Résultat void

ResumeAnimation() public méthode

Resume the animation.
public ResumeAnimation ( ) : void
Résultat void

SetFrame() public méthode

Sets the frame for the current active animation.
public SetFrame ( int frame ) : void
frame int /// The frame index. ///
Résultat void

StopAnimation() public méthode

Stops the animation.
public StopAnimation ( ) : void
Résultat void

Update() protected méthode

Updates the animation.
protected Update ( TimeSpan gameTime ) : void
gameTime TimeSpan /// The game time. ///
Résultat void