public class CircleBouncerAnimationElement extends AnimationElement
Constructor and Description |
---|
CircleBouncerAnimationElement(IItem item,
IStage stage)
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,
java.lang.Float radius) |
void |
clearCollidable()
Clear collidables
|
void |
elementStart(float tpf)
Called on the first
|
int |
getTapCount()
Gets the tap count.
|
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 |
resetTapCount()
Reset tap count.
|
void |
setRadius(float radius)
Sets the radius.
|
void |
updateAnimationState(float tpf)
Called each frame in the game loop.
|
enable, toString, updateState
public CircleBouncerAnimationElement(IItem item, IStage stage)
item
- The item to be influenced by this animation.stage
- The stage the item currently resides in.public void addCollidable(IItem item, java.lang.Float radius)
collidables
- the collidables to setpublic void clearCollidable()
public void elementStart(float tpf)
AnimationElement
elementStart
in class AnimationElement
public int getTapCount()
public boolean isFinished()
AnimationElement
isFinished
in class AnimationElement
public void removeCollidable(IItem item)
collidables
- the collidable item to removepublic void reset()
AnimationElement
isFinished()
reset
in class AnimationElement
public void resetTapCount()
public void setRadius(float radius)
radius
- the new radiuspublic void updateAnimationState(float tpf)
AnimationElement
updateAnimationState
in class AnimationElement