Actor and perform some task, often over time.
| Modifier and Type | Field and Description |
|---|---|
| protected Actor | actor
The actor this action is attached to, or null if it is not attached. |
| private Pool | |
| protected Actor | target
The actor this action targets, or null if a target has not been set. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | Returns: true if the action is done. This method may continue to be called after the action is done.Time in seconds since the last frame. delta)Updates the action based on time. |
| public Actor | |
| public Pool | |
| public Actor | |
| public void | reset()
Implements com. Resets the optional state of this action to as if it were newly created, allowing the action to be pooled and reused. |
| public void | |
| public void | |
| public void | |
| public void | |
| public String |
| actor | back to summary |
|---|---|
| protected Actor actor The actor this action is attached to, or null if it is not attached. | |
| pool | back to summary |
|---|---|
| private Pool<T> pool
| |
| target | back to summary |
|---|---|
| protected Actor target The actor this action targets, or null if a target has not been set. | |
| Action | back to summary |
|---|---|
| public Action() | |
| act | back to summary |
|---|---|
| public abstract boolean act(float delta) Updates the action based on time. Typically this is called each frame by
| |
| getActor | back to summary |
|---|---|
public Actor getActor()
| |
| getPool | back to summary |
|---|---|
public Pool
| |
| getTarget | back to summary |
|---|---|
public Actor getTarget()
| |
| reset | back to summary |
|---|---|
| public void reset() Implements com. 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 If a subclass has optional state, it must override this method, call super, and reset the optional state. | |
| restart | back to summary |
|---|---|
| public void restart() Sets the state of the action so it can be run again. | |
| setActor | back to summary |
|---|---|
| public void setActor(Actor actor) Sets the actor this action is attached to. This also sets the
When set to null, if the action has a
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 | |
| setPool | back to summary |
|---|---|
| public void setPool(Pool<T> pool) Sets the pool that the action will be returned to when removed from the actor.
| |
| setTarget | back to summary |
|---|---|
| public void setTarget(Actor target) Sets the actor this action will manipulate. If no target actor is set, | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |