|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.scenes.scene2d.Action com.badlogic.gdx.scenes.scene2d.actions.AddListenerAction
public class AddListenerAction
Adds a listener to an actor.
Constructor Summary | |
---|---|
AddListenerAction()
|
Method Summary | |
---|---|
boolean |
act(float delta)
Updates the action based on time. |
boolean |
getCapture()
|
EventListener |
getListener()
|
Actor |
getTargetActor()
|
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 |
setCapture(boolean capture)
|
void |
setListener(EventListener listener)
|
void |
setTargetActor(Actor actor)
Sets the actor to add a listneer to. |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Action |
---|
getActor, getPool, restart, setActor, setPool, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AddListenerAction()
Method Detail |
---|
public boolean act(float delta)
Action
Actor.act(float)
.
act
in class Action
delta
- Time in seconds since the last frame.
public Actor getTargetActor()
public void setTargetActor(Actor actor)
actor
will be used.
public EventListener getListener()
public void setListener(EventListener listener)
public boolean getCapture()
public void setCapture(boolean capture)
public 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.Poolable
reset
in class Action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |