public class RunnableAction extends Action
Runnable. Alternatively, the run() method can be overridden instead of setting a
runnable.| Constructor and Description |
|---|
RunnableAction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
act(float delta)
Updates the action based on time.
|
java.lang.Runnable |
getRunnable() |
void |
reset()
Resets the optional state of this action to as if it were newly created, allowing the action to be pooled and reused.
|
void |
restart()
Sets the state of the action so it can be run again.
|
void |
run()
Called to run the runnable.
|
void |
setRunnable(java.lang.Runnable runnable) |
public boolean act(float delta)
ActionActor.act(float).public void run()
public void restart()
Actionpublic void reset()
Action
The default implementation calls Action.restart().
If a subclass has optional state, it must override this method, call super, and reset the optional state.
reset in interface Pool.Poolablereset in class Actionpublic java.lang.Runnable getRunnable()
public void setRunnable(java.lang.Runnable runnable)