Constructor and Description |
---|
NoMotion(int start,
int stop)
Creates a motion for a move from start to stop.
|
Modifier and Type | Method and Description |
---|---|
int |
getCurrentValue()
Computes the current value of the motion.
|
long |
getDuration()
Gets the motion duration.
|
int |
getStartValue()
Gets the start value of the motion.
|
int |
getStopValue()
Gets the stop value of the motion.
|
int |
getValue(long elapsed)
Gets the value of the motion for a specific elapsed time.
|
boolean |
isFinished()
Gets whether the motion is finished or not.
|
void |
start()
Starts (or starts again) the motion.
|
public NoMotion(int start, int stop)
start
- the start value.stop
- the stop value.public int getCurrentValue()
Motion
If the motion is finished, returns the stop value.
getCurrentValue
in interface Motion
Motion.isFinished()
public long getDuration()
Motion
getDuration
in interface Motion
public int getStartValue()
Motion
getStartValue
in interface Motion
public int getStopValue()
Motion
getStopValue
in interface Motion
public int getValue(long elapsed)
Motion
public boolean isFinished()
Motion
A motion is finished when the current value is the stop one.
isFinished
in interface Motion
true
if the motion is finished, false
otherwise.