APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.scenes.scene2d.actions

public Class AlphaAction

extends TemporalAction
Class Inheritance
Imports
com.badlogic.gdx.graphics.Color, com.badlogic.gdx.scenes.scene2d.Actor, com.badlogic.gdx.utils.Null

Sets the alpha for an actor's color (or a specified color), from the current alpha to the new alpha. Note this action transitions from the alpha at the time the action starts to the specified alpha.
Author
Nathan Sweet

Field Summary

Modifier and TypeField and Description
private Color
private float
private float

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
public float
public Color
public void
reset()

Overrides com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.reset.

Implements com.badlogic.gdx.utils.Pool.Poolable.reset.

Resets the optional state of this action to as if it were newly created, allowing the action to be pooled and reused.

public void
setAlpha(float alpha)

public void
setColor(Color color)

Sets the color to modify.

protected void
update(float percent)

Implements abstract com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.update.

Called each frame.

Inherited from com.badlogic.gdx.scenes.scene2d.actions.TemporalAction:
actendfinishgetDurationgetInterpolationgetTimeisCompleteisReverserestartsetDurationsetInterpolationsetReversesetTime

Field Detail

colorback to summary
private Color color
Annotations
@Null
endback to summary
private float end
startback to summary
private float start

Constructor Detail

AlphaActionback to summary
public AlphaAction()

Method Detail

beginback to summary
protected void begin()

Overrides com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.begin.

Doc from com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.begin.

Called the first time act(float) is called. This is a good place to query the actor's starting state.

getAlphaback to summary
public float getAlpha()
getColorback to summary
public Color getColor()
Annotations
@Null
resetback to summary
public void reset()

Overrides com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.reset.

Implements com.badlogic.gdx.utils.Pool.Poolable.reset.

Doc from com.badlogic.gdx.scenes.scene2d.Action.reset.

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 restart().

If a subclass has optional state, it must override this method, call super, and reset the optional state.

setAlphaback to summary
public void setAlpha(float alpha)
setColorback to summary
public void setColor(Color color)

Sets the color to modify. If null (the default), the actor's color will be used.

updateback to summary
protected void update(float percent)

Implements abstract com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.update.

Doc from com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.update.

Called each frame.