public class PropAnimationController<T extends Prop> extends EntityAnimationController<T>
EntityAnimationController.AnimationRule<T extends IEntity>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_IDENTIFIER |
Constructor and Description |
---|
PropAnimationController(T prop)
Initializes a new instance of the
PropAnimationController class. |
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
getCurrentImage()
Gets the current sprite (keyframe) of the currently active animation of this controller.
|
static java.lang.String |
getSpriteName(Prop prop,
boolean appendState)
Gets the sprite name for the specified prop and state.
|
static java.lang.String |
getSpriteName(Prop prop,
PropState state,
boolean appendState)
Gets the sprite name for the specified prop and state.
|
boolean |
isAutoScaling()
Gets a flag indicating whether this controller instance is auto scaling its animations by the dimensions of the entity.
|
void |
update()
This method is called by the game loop on all objects that are attached to the loop.
|
addRule, addRule, getDefaultSpritePrefixes, getEntity, getSpritePrefix, scaleSprite, scaleSprite, setAutoScaling, setSpritePrefix
add, add, addListener, attach, buildCurrentCacheKey, clear, detach, get, getAffineTransform, getAll, getCurrent, getCurrentImage, getDefault, getImageEffects, hasAnimation, isEnabled, isPlaying, play, remove, remove, removeListener, setAffineTransform, setDefault, setEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, add, addListener, clear, get, getAffineTransform, getAll, getCurrent, getCurrentImage, getDefault, getImageEffects, hasAnimation, isEnabled, isPlaying, play, remove, remove, removeListener, setAffineTransform, setDefault, setEnabled
attach, detach
public static final java.lang.String PROP_IDENTIFIER
public PropAnimationController(T prop)
PropAnimationController
class.prop
- The prop related to this controller.public static java.lang.String getSpriteName(Prop prop, boolean appendState)
prop
- The prop to retrieve the sprite name for.appendState
- A flag indicating whether the state should be appended to the name.Prop.getSpritesheetName()
,
Prop.getState()
public static java.lang.String getSpriteName(Prop prop, PropState state, boolean appendState)
prop
- The prop to retrieve the sprite name for.state
- The state of the prop.appendState
- A flag indicating whether the state should be appended to the name.Prop.getSpritesheetName()
,
Prop.getState()
public java.awt.image.BufferedImage getCurrentImage()
IAnimationController
The implementation of this method applies all registered ImageEffects
.
getCurrentImage
in interface IAnimationController
getCurrentImage
in class AnimationController
IAnimationController.getCurrent()
,
Animation.getCurrentKeyFrame()
,
IAnimationController.isEnabled()
public void update()
IUpdateable
ClientConfiguration
.update
in interface IUpdateable
update
in class EntityAnimationController<T extends Prop>
ClientConfiguration.setMaxFps(int)
public boolean isAutoScaling()
IEntityAnimationController
isAutoScaling
in interface IEntityAnimationController<T extends Prop>
isAutoScaling
in class EntityAnimationController<T extends Prop>