Java com.badlogic.gdx.scenes.scene2d Actor fields, constructors, methods, implement or subclass

Example usage for Java com.badlogic.gdx.scenes.scene2d Actor fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.badlogic.gdx.scenes.scene2d Actor.

The text is from its open source code.

Subclass

com.badlogic.gdx.scenes.scene2d.Actor has subclasses.
Click this link to see all its subclasses.

Constructor

Method

voidact(float delta)
Updates the actor based on time.
voidaddAction(Action action)
booleanaddCaptureListener(EventListener listener)
Adds a listener that is only notified during the capture phase.
booleanaddListener(EventListener listener)
Add a listener to receive events that #hit(float,float,boolean) hit this actor.
voidclear()
Removes all actions and listeners on this actor.
voidclearActions()
Removes all actions on this actor.
voiddraw(Batch batch, float parentAlpha)
Draws the actor.
booleanfire(Event event)
Sets this actor as the event Event#setTarget(Actor) target and propagates the event to this actor and ancestor actors as necessary.
ArraygetActions()
ColorgetColor()
Returns the color the actor will be tinted when drawn.
floatgetHeight()
ArraygetListeners()
StringgetName()
Retrieve custom actor name set with Actor#setName(String) , used for easier identification
floatgetOriginX()
floatgetOriginY()
GroupgetParent()
Returns the parent actor, or null if not in a group.
floatgetRight()
Returns x plus width.
floatgetRotation()
floatgetScaleX()
floatgetScaleY()
StagegetStage()
Returns the stage that this actor is currently in, or null if not in a stage.
floatgetTop()
Returns y plus height.
TouchablegetTouchable()
ObjectgetUserObject()
Returns an application specific object for convenience, or null.
floatgetWidth()
floatgetX()
Returns the X position of the actor's left edge.
floatgetX(int alignment)
Returns the X position of the specified Align alignment .
floatgetY()
Returns the Y position of the actor's bottom edge.
floatgetY(int alignment)
Returns the Y position of the specified Align alignment .
intgetZIndex()
Returns the z-index of this actor.
booleanhasParent()
Returns true if the actor's parent is not null.
Actorhit(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.
booleanisDescendantOf(Actor actor)
Returns true if this actor is the same as or is the descendant of the specified actor.
booleanisTouchable()
Returns true if input events are processed by this actor.
booleanisVisible()
Vector2localToAscendantCoordinates(Actor ascendant, Vector2 localCoords)
Converts coordinates for this actor to those of a parent actor.
Vector2localToParentCoordinates(Vector2 localCoords)
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
Vector2localToStageCoordinates(Vector2 localCoords)
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
voidmoveBy(float x, float y)
Add x and y to current position
booleannotify(Event event, boolean capture)
Notifies this actor's listeners of the event.
Vector2parentToLocalCoordinates(Vector2 parentCoords)
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
booleanremove()
Removes this actor from its parent, if it has a parent.
booleanremoveListener(EventListener listener)
voidrotateBy(float amountInDegrees)
Adds the specified rotation to the current rotation.
voidscaleBy(float scale)
Adds the specified scale to the current scale.
voidsetBounds(float x, float y, float width, float height)
Set bounds the x, y, width, and height.
voidsetColor(Color color)
voidsetColor(float r, float g, float b, float a)
voidsetDebug(boolean enabled)
If true, #drawDebug(ShapeRenderer) will be called for this actor.
voidsetHeight(float height)
voidsetName(String name)
Sets a name for easier identification of the actor in application code.
voidsetOrigin(float originX, float originY)
Sets the origin position which is relative to the actor's bottom left corner.
voidsetOrigin(int alignment)
Sets the origin position to the specified Align alignment .
voidsetOriginX(float originX)
voidsetOriginY(float originY)
voidsetPosition(float x, float y)
Sets the position of the actor's bottom left corner.
voidsetPosition(float x, float y, int alignment)
Sets the position using the specified Align alignment .
voidsetRotation(float degrees)
voidsetScale(float scaleX, float scaleY)
Sets the scale X and scale Y.
voidsetScale(float scaleXY)
Sets the scale for both X and Y
voidsetScaleX(float scaleX)
voidsetScaleY(float scaleY)
voidsetSize(float width, float height)
Sets the width and height.
voidsetTouchable(Touchable touchable)
Determines how touch events are distributed to this actor.
voidsetUserObject(Object userObject)
Sets an application specific object for convenience.
voidsetVisible(boolean visible)
If false, the actor will not be drawn and will not receive touch events.
voidsetWidth(float width)
voidsetX(float x)
voidsetY(float y)
voidsetZIndex(int index)
Sets the z-index of this actor.
Vector2stageToLocalCoordinates(Vector2 stageCoords)
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
voidtoFront()
Changes the z-order for this actor so it is in front of all siblings.
StringtoString()