| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
| Constructor and Description |
|---|
PositionTracker(com.badlogic.gdx.physics.box2d.Body body) |
| Modifier and Type | Method and Description |
|---|---|
com.badlogic.gdx.physics.box2d.Body |
getBody() |
float |
getCurrentX() |
float |
getCurrentY() |
float |
getRenderX() |
float |
getRenderY() |
void |
interpolate(float alpha)
Calculates the render coordinates by linear interpolating between the
previous and current position
|
void |
update()
Updates the coordinates
|
compareTo, destroy, getComponent, getComponent, getComponent, getComponent, getComponentInDescendants, getComponentInDescendants, getComponentInDescendants, getComponentInDescendants, getComponents, getComponents, getComponentsInDescendants, getComponentsInDescendants, getComponentTypeId, getEntity, getName, onAddToEntity, setEntitypublic static final java.lang.String NAME
public void update()
public void interpolate(float alpha)
alpha - The alpha value to interpolate bypublic float getCurrentX()
public float getCurrentY()
public float getRenderX()
public float getRenderY()
public com.badlogic.gdx.physics.box2d.Body getBody()