Interface IEntityAnimationController<T extends IEntity>

All Superinterfaces:
IAnimationController, IEntityController, IUpdateable
All Known Implementing Classes:
CreatureAnimationController, EntityAnimationController, PropAnimationController

public interface IEntityAnimationController<T extends IEntity>
extends IAnimationController, IEntityController
  • Method Details

    • addRule

      void addRule​(java.util.function.Predicate<? super T> rule, java.util.function.Function<? super T,​java.lang.String> animationName)
      Registers an animation rule that will be evaluated if there is currently no animation playing that is defined to loop. This allows to specify animations that should be applied under certain conditions.
      Parameters:
      rule - The rule that must be fulfilled for the animation to be applied
      animationName - The callback that evaluates the actual animation name that will be applied
    • addRule

      void addRule​(java.util.function.Predicate<? super T> rule, java.util.function.Function<? super T,​java.lang.String> animationName, int priority)
      Registers an animation rule that will be evaluated if there is currently no animation playing that is defined to loop. This allows to specify animations that should be applied under certain conditions.
      Parameters:
      rule - The rule that must be fulfilled for the animation to be applied
      animationName - The callback that evaluates the actual animation name that will be applied
      priority - The priority that defines the order in which the rule will be processed. Rules with higher priorities will be processed first.
    • isAutoScaling

      boolean isAutoScaling()
      Gets a flag indicating whether this controller instance is auto scaling its animations by the dimensions of the entity.
      Returns:
      True if this instance is automatically scaling to the dimensions of the entity; otherwise false.
    • setAutoScaling

      void setAutoScaling​(boolean scaling)
      Sets a value indicating whether this controller instance is auto scaling its animations by the dimensions of the entity
      Parameters:
      scaling - True if this instance is automatically scaling to the dimensions of the entity; otherwise false.
    • scaleSprite

      void scaleSprite​(float ratioX, float ratioY)
      Sets the dimensions used to scale the animations of this controller instance.
      Parameters:
      ratioX - The x-ratio to scale the animation with.
      ratioY - The y-ratio to scale the animation with.
    • scaleSprite

      void scaleSprite​(float ratio)
      Sets the ratio used to scale the animations of this controller instance.
      Parameters:
      ratio - The ratio to scale the animation with.