public class AnimationRunner
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
delay
Default is 50 fps.
|
(package private) IEffect |
effect |
(package private) boolean |
running |
Constructor and Description |
---|
AnimationRunner()
Create a new animation runner using the default framerate (50 fps)
|
AnimationRunner(int framerate)
Create a new animation runner, which can run only one effect at the same
time.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Stops the current effect if any, and execute the corresponding onCancel
runnable.
|
void |
runEffect(IEffect effect)
Start a new effect, cancelling the previous one if any.
|
int delay
IEffect effect
boolean running
public AnimationRunner()
public AnimationRunner(int framerate)
framerate
- the animation framerate.public void runEffect(IEffect effect)
effect
- public void cancel()