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 Summary
Modifier and TypeMethodDescriptionvoidRegisters an animation rule that will be evaluated if there is currently no animation playing that is defined to loop.voidRegisters an animation rule that will be evaluated if there is currently no animation playing that is defined to loop.booleanGets a flag indicating whether this controller instance is auto scaling its animations by the dimensions of the entity.voidscaleSprite(float ratio) Sets the ratio used to scale the animations of this controller instance.voidscaleSprite(float ratioX, float ratioY) Sets the dimensions used to scale the animations of this controller instance.voidsetAutoScaling(boolean scaling) Sets a value indicating whether this controller instance is auto scaling its animations by the dimensions of the entityMethods 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, setEnabledMethods inherited from interface de.gurkenlabs.litiengine.entities.IEntityController
attach, detach, getEntityMethods inherited from interface de.gurkenlabs.litiengine.IUpdateable
update
-
Method Details
-
addRule
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
-
addRule
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.
-
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.
-