Class AnimationController.AnimationDesc

  • Enclosing class:
    AnimationController

    public static class AnimationController.AnimationDesc
    extends java.lang.Object
    Class describing how to play and Animation. You can read the values within this class to get the progress of the animation. Do not change the values. Only valid when the animation is currently played.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      Animation animation
      The animation to be applied.
      float duration
      The duration of the animation
      AnimationController.AnimationListener listener
      Listener which will be informed when the animation is looped or ended.
      int loopCount
      The number of remaining loops, negative for continuous, zero if stopped.
      float offset
      The offset within the animation (animation time = offsetTime + time)
      float speed
      The speed at which to play the animation (can be negative), 1.0 for normal speed.
      float time
      The current animation time.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AnimationDesc()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected float update​(float delta)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • animation

        public Animation animation
        The animation to be applied.
      • speed

        public float speed
        The speed at which to play the animation (can be negative), 1.0 for normal speed.
      • time

        public float time
        The current animation time.
      • offset

        public float offset
        The offset within the animation (animation time = offsetTime + time)
      • duration

        public float duration
        The duration of the animation
      • loopCount

        public int loopCount
        The number of remaining loops, negative for continuous, zero if stopped.
    • Constructor Detail

      • AnimationDesc

        protected AnimationDesc()
    • Method Detail

      • update

        protected float update​(float delta)
        Parameters:
        delta - delta time, must be positive.
        Returns:
        the remaining time or -1 if still animating.