-
Method Summary
Modifier and Type | Method | 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 |
---|
Methods inherited from interface de.gurkenlabs.litiengine.graphics.animation.IAnimationController
add, add, addListener, clear, get, getAffineTransform, getAll, getCurrent, getCurrentImage, getCurrentImage, getDefault, getImageEffects, hasAnimation, isEnabled, isPlaying, play, remove, remove, removeListener, setAffineTransform, setDefault, setEnabled
-
Method Details
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 appliedanimationName
- The callback that evaluates the actual animation name that will be
applied
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 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()
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.
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.
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.
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.