public class RotateToAction extends TemporalAction
MathUtils.lerpAngleDeg(float, float, float)| Constructor and Description |
|---|
RotateToAction() |
RotateToAction(boolean useShortestDirection) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
begin()
Called the first time
TemporalAction.act(float) is called. |
float |
getRotation() |
boolean |
isUseShortestDirection() |
void |
setRotation(float rotation) |
void |
setUseShortestDirection(boolean useShortestDirection) |
protected void |
update(float percent)
Called each frame.
|
act, end, finish, getDuration, getInterpolation, getTime, isReverse, reset, restart, setDuration, setInterpolation, setReverse, setTimepublic RotateToAction()
public RotateToAction(boolean useShortestDirection)
useShortestDirection - Set to true to move directly to the closest angleprotected void begin()
TemporalActionTemporalAction.act(float) is called. This is a good place to query the actor's starting
state.begin in class TemporalActionprotected void update(float percent)
TemporalActionupdate in class TemporalActionpercent - The percentage of completion for this action, growing from 0 to 1 over the duration. If
reversed, this will shrink from 1 to 0.public float getRotation()
public void setRotation(float rotation)
public boolean isUseShortestDirection()
public void setUseShortestDirection(boolean useShortestDirection)