T
- the generic type of the Transformablepublic class PositionTransform<T> extends Transformation<PositionTransform,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> |
to(int x,
int y)
Sets the target position
|
completion, delay, forTicks, forTicks, getDelay, getDuration, getLoopDuration, getLoops, loop, loop, movement, reversed, totalDuration, transform, transform
protected 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> from(int x, int y)
x
- the xy
- the yPositionTransform
public PositionTransform<T> to(int x, int y)
x
- the xy
- the yPositionTransform
protected void doTransform(ITransformable.Position<T> transformable, float comp)
doTransform
in class Transformation<PositionTransform,ITransformable.Position<T>>
transformable
- the transformablecomp
- the comp