C# Class Nez.Sprites.SpriteAnimation

houses the information that a SpriteT requires for animation
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
completionBehavior AnimationCompletionBehavior
delay float
frames List
totalDuration float

Méthodes publiques

Méthode Description
SpriteAnimation ( ) : System.Collections.Generic
SpriteAnimation ( List frames ) : System.Collections.Generic
SpriteAnimation ( Subtexture frame ) : System.Collections.Generic
addFrame ( Subtexture subtexture ) : SpriteAnimation

adds a frame to this animation

addFrames ( List subtextures ) : SpriteAnimation

adds multiple frames to this animation

prepareForUse ( ) : void

called by SpriteT to calculate the secondsPerFrame and totalDuration based on the loop details and frame count

setFps ( float fps ) : SpriteAnimation
setLoop ( bool loop ) : SpriteAnimation
setOrigin ( Vector2 origin ) : SpriteAnimation

sets the origin for all frames in this animation

setPingPong ( bool pingPong ) : SpriteAnimation

Method Details

SpriteAnimation() public méthode

public SpriteAnimation ( ) : System.Collections.Generic
Résultat System.Collections.Generic

SpriteAnimation() public méthode

public SpriteAnimation ( List frames ) : System.Collections.Generic
frames List
Résultat System.Collections.Generic

SpriteAnimation() public méthode

public SpriteAnimation ( Subtexture frame ) : System.Collections.Generic
frame Nez.Textures.Subtexture
Résultat System.Collections.Generic

addFrame() public méthode

adds a frame to this animation
public addFrame ( Subtexture subtexture ) : SpriteAnimation
subtexture Nez.Textures.Subtexture Subtexture.
Résultat SpriteAnimation

addFrames() public méthode

adds multiple frames to this animation
public addFrames ( List subtextures ) : SpriteAnimation
subtextures List Subtextures.
Résultat SpriteAnimation

prepareForUse() public méthode

called by SpriteT to calculate the secondsPerFrame and totalDuration based on the loop details and frame count
public prepareForUse ( ) : void
Résultat void

setFps() public méthode

public setFps ( float fps ) : SpriteAnimation
fps float
Résultat SpriteAnimation

setLoop() public méthode

public setLoop ( bool loop ) : SpriteAnimation
loop bool
Résultat SpriteAnimation

setOrigin() public méthode

sets the origin for all frames in this animation
public setOrigin ( Vector2 origin ) : SpriteAnimation
origin Microsoft.Xna.Framework.Vector2
Résultat SpriteAnimation

setPingPong() public méthode

public setPingPong ( bool pingPong ) : SpriteAnimation
pingPong bool
Résultat SpriteAnimation

Property Details

completionBehavior public_oe property

public AnimationCompletionBehavior completionBehavior
Résultat AnimationCompletionBehavior

delay public_oe property

public float delay
Résultat float

frames public_oe property

public List frames
Résultat List

totalDuration public_oe property

public float totalDuration
Résultat float