APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.scenes.scene2d.actions

public Class MoveToAction

extends TemporalAction
Class Inheritance
Imports
com.badlogic.gdx.utils.Align

Moves an actor from its current position to a specific position.
Author
Nathan Sweet

Field Summary

Modifier and TypeField and Description
private int
private float
private float
private float
private float

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
public int
public float
getStartX()

Gets the starting X value, set in begin().

public float
getStartY()

Gets the starting Y value, set in begin().

public float
getX()

public float
getY()

public void
reset()

Overrides com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.reset.

Implements com.badlogic.gdx.utils.Pool.Poolable.reset.

Resets the optional state of this action to as if it were newly created, allowing the action to be pooled and reused.

public void
setAlignment(int alignment)

public void
setPosition(float x, float y)

public void
setPosition(float x, float y, int alignment)

public void
setStartPosition(float x, float y)

public void
setX(float x)

public void
setY(float y)

protected void
update(float percent)

Implements abstract com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.update.

Called each frame.

Inherited from com.badlogic.gdx.scenes.scene2d.actions.TemporalAction:
actendfinishgetDurationgetInterpolationgetTimeisCompleteisReverserestartsetDurationsetInterpolationsetReversesetTime

Field Detail

alignmentback to summary
private int alignment
endXback to summary
private float endX
endYback to summary
private float endY
startXback to summary
private float startX
startYback to summary
private float startY

Constructor Detail

MoveToActionback to summary
public MoveToAction()

Method Detail

beginback to summary
protected void begin()

Overrides com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.begin.

Doc from com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.begin.

Called the first time act(float) is called. This is a good place to query the actor's starting state.

getAlignmentback to summary
public int getAlignment()
getStartXback to summary
public float getStartX()

Gets the starting X value, set in begin().

getStartYback to summary
public float getStartY()

Gets the starting Y value, set in begin().

getXback to summary
public float getX()
getYback to summary
public float getY()
resetback to summary
public void reset()

Overrides com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.reset.

Implements com.badlogic.gdx.utils.Pool.Poolable.reset.

Doc from com.badlogic.gdx.scenes.scene2d.Action.reset.

Resets the optional state of this action to as if it were newly created, allowing the action to be pooled and reused. State required to be set for every usage of this action or computed during the action does not need to be reset.

The default implementation calls restart().

If a subclass has optional state, it must override this method, call super, and reset the optional state.

setAlignmentback to summary
public void setAlignment(int alignment)
setPositionback to summary
public void setPosition(float x, float y)
setPositionback to summary
public void setPosition(float x, float y, int alignment)
setStartPositionback to summary
public void setStartPosition(float x, float y)
setXback to summary
public void setX(float x)
setYback to summary
public void setY(float y)
updateback to summary
protected void update(float percent)

Implements abstract com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.update.

Doc from com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.update.

Called each frame.