public interface Animator
Modifier and Type | Field and Description |
---|---|
static int |
ANIMATING
Animation is currently animating.
|
static int |
FINISHED
Animation is finished (only in play case).
|
static int |
READY
Animation is ready to be played.
|
static int |
REVERSE_ANIMATING
Animation is currently reversed.
|
Modifier and Type | Method and Description |
---|---|
int |
getFrame()
Get current frame.
|
int |
getState()
Get current animation state.
|
void |
play(Animation animation)
Play an animation.
|
void |
play(Animation animation,
float speed)
Play an animation, be setting a specific speed.
|
void |
play(int start,
int end,
float speed,
boolean reverse,
boolean repeat)
Play an animation, be setting a specific data.
|
void |
setFrame(int frame)
Set animation frame.
|
void |
stop()
Stop current animation.
|
void |
update(float extrp)
Set extrapolation value.
|
static final int READY
static final int ANIMATING
static final int REVERSE_ANIMATING
static final int FINISHED
void play(Animation animation)
animation
- animation to play (data container).void play(Animation animation, float speed)
animation
- animation to play (data container).speed
- animation speed.void play(int start, int end, float speed, boolean reverse, boolean repeat)
start
- first frame to play.end
- last frame to reach.speed
- specified speed.reverse
- reverse play when end is reach.repeat
- play in loop.void stop()
void update(float extrp)
extrp
- extrapolation value.int getState()
void setFrame(int frame)
frame
- frame to set.int getFrame()