|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.scenes.scene2d.Action
public abstract class Action
An Action is used with an Actor
and modifes the Actor's attributes over time.
Field Summary | |
---|---|
protected OnActionCompleted |
listener
|
Constructor Summary | |
---|---|
Action()
|
Method Summary | |
---|---|
abstract void |
act(float delta)
Apply the action. |
void |
callActionCompletedListener()
Calls the OnActionCompleted listener and sets it to null so it won't be called again. |
abstract Action |
copy()
Creates a copy of this action. |
void |
finish()
Called by the owner of the action when it can release all its resources, e.g. |
OnActionCompleted |
getCompletionListener()
|
abstract Actor |
getTarget()
|
abstract boolean |
isDone()
|
void |
reset()
Sets the Action back to a vanilla state. |
Action |
setCompletionListener(OnActionCompleted listener)
Sets the listener to be invoked when the action is finished. |
abstract void |
setTarget(Actor actor)
Sets the Actor of this action. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OnActionCompleted listener
Constructor Detail |
---|
public Action()
Method Detail |
---|
public abstract void setTarget(Actor actor)
Actor
of this action. Will be called when the Action is added to an Actor via Actor.action(Action)
before any other call to this interface.
actor
- the actor.public abstract Actor getTarget()
Actor
this action targets.public abstract void act(float delta)
delta
- delta time in secondspublic abstract boolean isDone()
public void finish()
public void callActionCompletedListener()
OnActionCompleted
listener and sets it to null so it won't be called again.
public abstract Action copy()
setTarget(Actor)
on it without any side effects.
public Action setCompletionListener(OnActionCompleted listener)
listener
-
public OnActionCompleted getCompletionListener()
OnActionCompleted
listener or null.public void reset()
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |