public class ParallelAction extends Action
| Constructor and Description |
|---|
ParallelAction() |
ParallelAction(Action action1) |
ParallelAction(Action action1,
Action action2) |
ParallelAction(Action action1,
Action action2,
Action action3) |
ParallelAction(Action action1,
Action action2,
Action action3,
Action action4) |
ParallelAction(Action action1,
Action action2,
Action action3,
Action action4,
Action action5) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
act(float delta)
Updates the action based on time.
|
void |
addAction(Action action) |
Array<Action> |
getActions() |
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 |
setActor(Actor actor)
Sets the actor this action is attached to.
|
java.lang.String |
toString() |
public ParallelAction()
public ParallelAction(Action action1)
public ParallelAction(Action action1, Action action2, Action action3, Action action4)
public boolean act(float delta)
ActionActor.act(float).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 void addAction(Action action)
public void setActor(Actor actor)
Actiontarget actor if it is null. This
method is called automatically when an action is added to an actor. This method is also called with null when an action is
removed from an actor.
When set to null, if the action has a pool then the action is returned to
the pool (which calls Action.reset()) and the pool is set to null. If the action does not have a pool, Action.reset() is
not called.
This method is not typically a good place for an action subclass to query the actor's state because the action may not be
executed for some time, eg it may be delayed. The actor's state is best queried in the first call to
Action.act(float). For a TemporalAction, use TemporalAction#begin().