Class Animator
- Namespace
- LibGFX.Graphics.Animation2D
- Assembly
- LibGFX.dll
Represents an animator for 2D animations.
public class Animator
- Inheritance
-
Animator
- Inherited Members
Constructors
Animator()
Creates a new animator.
public Animator()
Properties
AnimationCallbacks
The list of animation callbacks associated with this animator.
public List<IAnimationCallback> AnimationCallbacks { get; set; }
Property Value
Animations
The list of animations associated with this animator.
public List<Animation2D> Animations { get; set; }
Property Value
CurrentAnimation
The current animation being played.
public Animation2D CurrentAnimation { get; set; }
Property Value
Loop
public bool Loop { get; set; }
Property Value
Methods
GetCurrentFrame()
Gets the current frame of the animation. It returns the material and the UV transform of the current frame.
public (SpriteMaterial, Vector4) GetCurrentFrame()
Returns
PlayAnimation(string)
Plays the specified animation.
public void PlayAnimation(string animationName)
Parameters
animationNamestring
Stop()
Stops the current animation.
public void Stop()
Update(float)
Updates the animator and the current animation.
public void Update(float deltaTime)
Parameters
deltaTimefloat