T - the generic type of the Transformablepublic class PositionTransform<T> extends Transformation<PositionTransform<T>,ITransformable.Position<T>>
| Modifier and Type | Field and Description |
|---|---|
protected int |
fromX
Starting position.
|
protected int |
fromY
Starting position.
|
protected int |
toX
Target position.
|
protected int |
toY
Target position.
|
delay, duration, elapsedTimeCurrentLoop, LINEAR, loopResetDelay, loops, loopStartDelay, movement, reversed, SINUSOIDAL| Constructor and Description |
|---|
PositionTransform(int fromX,
int fromY,
int toX,
int toY)
Instantiates a new
PositionTransform. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doTransform(ITransformable.Position<T> transformable,
float comp)
Calculates the transformation
|
PositionTransform<T> |
from(int x,
int y)
Sets the starting position.
|
PositionTransform<T> |
self()
Gets this
PositionTransform. |
PositionTransform<T> |
to(int x,
int y)
Sets the target position
|
completion, delay, forTicks, forTicks, getDelay, getDuration, getLoopDuration, getLoops, loop, loop, movement, reversed, totalDuration, transform, transformprotected int fromX
protected int fromY
protected int toX
protected int toY
public PositionTransform(int fromX,
int fromY,
int toX,
int toY)
PositionTransform.fromX - the from xfromY - the from ytoX - the to xtoY - the to ypublic PositionTransform<T> self()
PositionTransform.self in class Transformation<PositionTransform<T>,ITransformable.Position<T>>public PositionTransform<T> from(int x, int y)
x - the xy - the yPositionTransformpublic PositionTransform<T> to(int x, int y)
x - the xy - the yPositionTransformprotected void doTransform(ITransformable.Position<T> transformable, float comp)
doTransform in class Transformation<PositionTransform<T>,ITransformable.Position<T>>transformable - the transformablecomp - the comp