public class CollisionBoxAnimationElement extends AnimationElement
| Constructor and Description |
|---|
CollisionBoxAnimationElement(IItem item)
Creates an animation element for the supplied item which can then create
the flick motion by repositioning the managed item using JME's animation
system.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCollidable(IItem item,
com.jme3.math.Vector2f dimensions) |
void |
elementStart(float tpf)
Called on the first
|
boolean |
isFinished()
When this method returns true, the animation element will be reset.
|
void |
removeCollidable(IItem item) |
void |
reset()
Called when the animation element is finished.
|
void |
updateAnimationState(float tpf)
Called each frame in the game loop.
|
enable, toString, updateStatepublic CollisionBoxAnimationElement(IItem item)
item - The item to be influenced by this animation.stage - The stage the item currently resides in.public void addCollidable(IItem item, com.jme3.math.Vector2f dimensions)
collidables - the collidables to setpublic void elementStart(float tpf)
AnimationElementelementStart in class AnimationElementpublic boolean isFinished()
AnimationElementisFinished in class AnimationElementpublic void removeCollidable(IItem item)
collidables - the collidable item to removepublic void reset()
AnimationElementisFinished()reset in class AnimationElementpublic void updateAnimationState(float tpf)
AnimationElementupdateAnimationState in class AnimationElement