public class InertiaAnimationElement extends AnimationElement
| Constructor and Description |
|---|
InertiaAnimationElement(IItem item,
IStage stage)
Instantiates a new inertia animation element.
|
| Modifier and Type | Method and Description |
|---|---|
void |
elementStart(float tpf)
Called on the first
|
float |
getDecelerationFactor()
Gets the deceleration factor.
|
boolean |
isFinished()
When this method returns true, the animation element will be reset.
|
void |
moveWithVelocity(com.jme3.math.Vector2f velocity)
Move with velocity.
|
void |
reset()
Called when the animation element is finished.
|
void |
setDeceleration(float deceleration)
Sets the deceleration.
|
void |
updateAnimationState(float tpf)
Called each frame in the game loop.
|
enable, toString, updateStatepublic void elementStart(float tpf)
AnimationElementelementStart in class AnimationElementpublic float getDecelerationFactor()
public boolean isFinished()
AnimationElementisFinished in class AnimationElementpublic void moveWithVelocity(com.jme3.math.Vector2f velocity)
velocity - the velocitypublic void reset()
AnimationElementisFinished()reset in class AnimationElementpublic void setDeceleration(float deceleration)
deceleration - the new decelerationpublic void updateAnimationState(float tpf)
AnimationElementupdateAnimationState in class AnimationElement