Class AnimationState

java.lang.Object
com.jme3.app.state.BaseAppState
com.simsilica.lemur.anim.AnimationState
All Implemented Interfaces:
AppState

public class AnimationState extends BaseAppState
Manages a list of Animation tasks, calling them each once per frame until done or canceled.
  • Field Details

  • Constructor Details

    • AnimationState

      public AnimationState()
  • Method Details

    • getDefaultInstance

      public static AnimationState getDefaultInstance()
      Returns the default animation state instance.
    • isRunning

      public boolean isRunning(Animation anim)
      Returns true if the specified animation object is currently running, ie: will be executed this frame.
    • add

      public <T extends Animation> T add(T anim)
      Begins executing the specified animation. The passed animation is returned directly to the caller.
    • add

      public TweenAnimation add(Tween... sequence)
      Creates a TweenAnimation from the specified tween or tweens. If more than one Tween is passed then they are wrapped in a sequence.
    • cancel

      public void cancel(Animation anim)
      Cancels a currently running animation.
    • remove

      protected void remove(Animation anim)
    • initialize

      protected void initialize(Application app)
      Description copied from class: BaseAppState
      Called during initialization once the app state is attached and before onEnable() is called.
      Specified by:
      initialize in class BaseAppState
      Parameters:
      app - the application
    • cleanup

      protected void cleanup(Application app)
      Description copied from class: BaseAppState
      Called after the app state is detached or during application shutdown if the state is still attached. onDisable() is called before this cleanup() method if the state is enabled at the time of cleanup.
      Specified by:
      cleanup in class BaseAppState
      Parameters:
      app - the application
    • onEnable

      protected void onEnable()
      Description copied from class: BaseAppState
      Called when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.
      Specified by:
      onEnable in class BaseAppState
    • update

      public void update(float tpf)
      Description copied from interface: AppState
      Called to update the AppState. This method will be called every render pass if the AppState is both attached and enabled.
      Specified by:
      update in interface AppState
      Overrides:
      update in class BaseAppState
      Parameters:
      tpf - Time since the last call to update(), in seconds.
    • onDisable

      protected void onDisable()
      Description copied from class: BaseAppState
      Called when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.
      Specified by:
      onDisable in class BaseAppState