Example usage for Java com.badlogic.gdx.scenes.scene2d Actor fields, constructors, methods, implement or subclass
The text is from its open source code.
void | act(float delta) Updates the actor based on time. |
void | addAction(Action action) |
boolean | addCaptureListener(EventListener listener) Adds a listener that is only notified during the capture phase. |
boolean | addListener(EventListener listener) Add a listener to receive events that #hit(float,float,boolean) hit this actor. |
void | clear() Removes all actions and listeners on this actor. |
void | clearActions() Removes all actions on this actor. |
void | draw(Batch batch, float parentAlpha) Draws the actor. |
boolean | fire(Event event) Sets this actor as the event Event#setTarget(Actor) target and propagates the event to this actor and ancestor actors as necessary. |
Array | getActions() |
Color | getColor() Returns the color the actor will be tinted when drawn. |
float | getHeight() |
Array | getListeners() |
String | getName() Retrieve custom actor name set with Actor#setName(String) , used for easier identification |
float | getOriginX() |
float | getOriginY() |
Group | getParent() Returns the parent actor, or null if not in a group. |
float | getRight() Returns x plus width. |
float | getRotation() |
float | getScaleX() |
float | getScaleY() |
Stage | getStage() Returns the stage that this actor is currently in, or null if not in a stage. |
float | getTop() Returns y plus height. |
Touchable | getTouchable() |
Object | getUserObject() Returns an application specific object for convenience, or null. |
float | getWidth() |
float | getX() Returns the X position of the actor's left edge. |
float | getX(int alignment) Returns the X position of the specified Align alignment . |
float | getY() Returns the Y position of the actor's bottom edge. |
float | getY(int alignment) Returns the Y position of the specified Align alignment . |
int | getZIndex() Returns the z-index of this actor. |
boolean | hasParent() Returns true if the actor's parent is not null. |
Actor | hit(float x, float y, boolean touchable) Returns the deepest actor that contains the specified point and is #getTouchable() touchable and #isVisible() visible , or null if no actor was hit. |
boolean | isDescendantOf(Actor actor) Returns true if this actor is the same as or is the descendant of the specified actor. |
boolean | isTouchable() Returns true if input events are processed by this actor. |
boolean | isVisible() |
Vector2 | localToAscendantCoordinates(Actor ascendant, Vector2 localCoords) Converts coordinates for this actor to those of a parent actor. |
Vector2 | localToParentCoordinates(Vector2 localCoords) Transforms the specified point in the actor's coordinates to be in the parent's coordinates. |
Vector2 | localToStageCoordinates(Vector2 localCoords) Transforms the specified point in the actor's coordinates to be in the stage's coordinates. |
void | moveBy(float x, float y) Add x and y to current position |
boolean | notify(Event event, boolean capture) Notifies this actor's listeners of the event. |
Vector2 | parentToLocalCoordinates(Vector2 parentCoords) Converts the coordinates given in the parent's coordinate system to this actor's coordinate system. |
boolean | remove() Removes this actor from its parent, if it has a parent. |
boolean | removeListener(EventListener listener) |
void | rotateBy(float amountInDegrees) Adds the specified rotation to the current rotation. |
void | scaleBy(float scale) Adds the specified scale to the current scale. |
void | setBounds(float x, float y, float width, float height) Set bounds the x, y, width, and height. |
void | setColor(Color color) |
void | setColor(float r, float g, float b, float a) |
void | setDebug(boolean enabled) If true, #drawDebug(ShapeRenderer) will be called for this actor. |
void | setHeight(float height) |
void | setName(String name) Sets a name for easier identification of the actor in application code. |
void | setOrigin(float originX, float originY) Sets the origin position which is relative to the actor's bottom left corner. |
void | setOrigin(int alignment) Sets the origin position to the specified Align alignment . |
void | setOriginX(float originX) |
void | setOriginY(float originY) |
void | setPosition(float x, float y) Sets the position of the actor's bottom left corner. |
void | setPosition(float x, float y, int alignment) Sets the position using the specified Align alignment . |
void | setRotation(float degrees) |
void | setScale(float scaleX, float scaleY) Sets the scale X and scale Y. |
void | setScale(float scaleXY) Sets the scale for both X and Y |
void | setScaleX(float scaleX) |
void | setScaleY(float scaleY) |
void | setSize(float width, float height) Sets the width and height. |
void | setTouchable(Touchable touchable) Determines how touch events are distributed to this actor. |
void | setUserObject(Object userObject) Sets an application specific object for convenience. |
void | setVisible(boolean visible) If false, the actor will not be drawn and will not receive touch events. |
void | setWidth(float width) |
void | setX(float x) |
void | setY(float y) |
void | setZIndex(int index) Sets the z-index of this actor. |
Vector2 | stageToLocalCoordinates(Vector2 stageCoords) Transforms the specified point in the stage's coordinates to the actor's local coordinate system. |
void | toFront() Changes the z-order for this actor so it is in front of all siblings. |
String | toString() |