C# Class WaveEngine.Components.Animation.Animation2D

Inheritance: AnimationBase
ファイルを表示 Open project: WaveEngine/Components Class Usage Examples

Private Properties

Property Type Description
HandleEndAnimation void
HandleKeyFrameEvents void

Public Methods

Method 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.

Protected Methods

Method Description
DefaultValues ( ) : void

Sets the default values

Initialize ( ) : void

Initialzie the component

Update ( TimeSpan gameTime ) : void

Updates the animation.

Private Methods

Method Description
HandleEndAnimation ( ) : void

Handle End animation

HandleKeyFrameEvents ( ) : void

Handle key frame events

Method Details

Animation2D() public method

Initializes a new instance of the Animation2D class.
public Animation2D ( ) : System
return System

DefaultValues() protected method

Sets the default values
protected DefaultValues ( ) : void
return void

Initialize() protected method

Initialzie the component
protected Initialize ( ) : void
return void

PlayAnimation() public method

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.
return void

PlayAnimation() public method

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.
return void

ResumeAnimation() public method

Resume the animation.
public ResumeAnimation ( ) : void
return void

SetFrame() public method

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

StopAnimation() public method

Stops the animation.
public StopAnimation ( ) : void
return void

Update() protected method

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