Modifier and Type | Field and Description |
---|---|
(package private) int |
currentEffect |
(package private) IEffect[] |
effects |
(package private) long |
length |
(package private) java.lang.Runnable |
onCancel |
(package private) java.lang.Runnable |
onStop |
(package private) long |
start |
Constructor and Description |
---|
SequenceEffect(IEffect[] effects,
java.lang.Runnable onStop,
java.lang.Runnable onCancel)
Run several effects one after another.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Set the effect as done and run the cancel runnable.
|
void |
doEffect(long time)
Apply effect to the target according to the given time.
|
long |
getLength()
Get effect length
|
boolean |
isDone() |
int currentEffect
IEffect[] effects
long length
java.lang.Runnable onCancel
java.lang.Runnable onStop
long start
public SequenceEffect(IEffect[] effects, java.lang.Runnable onStop, java.lang.Runnable onCancel)
Note :
effects
- onStop
- onCancel
- public void cancel()
IEffect
cancel
in interface IEffect
IEffect.cancel()
public void doEffect(long time)
IEffect
doEffect
in interface IEffect
time
- - Current time in ms. This value may be larger than the effect
length.IEffect.doEffect(long)
public long getLength()
IEffect
getLength
in interface IEffect
IEffect.getLength()
public boolean isDone()
isDone
in interface IEffect
IEffect.isDone()