public interface IEntityAnimationController<T extends IEntity> extends IAnimationController, IEntityController
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
boolean |
isAutoScaling()
Gets a flag indicating whether this controller instance is auto scaling its animations by the dimensions of the entity.
|
void |
scaleSprite(float ratio)
Sets the ratio used to scale the animations of this controller instance.
|
void |
scaleSprite(float ratioX,
float ratioY)
Sets the dimensions used to scale the animations of this controller instance.
|
void |
setAutoScaling(boolean scaling)
Sets a value indicating whether this controller instance is auto scaling its animations by the dimensions of the entity
|
add, add, addListener, clear, get, getAffineTransform, getAll, getCurrent, getCurrentImage, getCurrentImage, getDefault, getImageEffects, hasAnimation, isEnabled, isPlaying, play, remove, remove, removeListener, setAffineTransform, setDefault, setEnabled
attach, detach, getEntity
update
void addRule(java.util.function.Predicate<? super T> rule, java.util.function.Function<? super T,java.lang.String> animationName)
rule
- The rule that must be fulfilled for the animation to be appliedanimationName
- The callback that evaluates the actual animation name that will be
appliedvoid addRule(java.util.function.Predicate<? super T> rule, java.util.function.Function<? super T,java.lang.String> animationName, int priority)
rule
- The rule that must be fulfilled for the animation to be appliedanimationName
- The callback that evaluates the actual animation name that will be
appliedpriority
- The priority that defines the order in which the rule will be processed. Rules with higher priorities
will be processed first.boolean isAutoScaling()
void setAutoScaling(boolean scaling)
scaling
- True if this instance is automatically scaling to the dimensions of the entity; otherwise false.void scaleSprite(float ratioX, float ratioY)
ratioX
- The x-ratio to scale the animation with.ratioY
- The y-ratio to scale the animation with.void scaleSprite(float ratio)
ratio
- The ratio to scale the animation with.