Package squidpony.squidgrid.gui.gdx
Class PackedColorAction
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Action
com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
squidpony.squidgrid.gui.gdx.PackedColorAction
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable
public class PackedColorAction extends com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
Sets the actor's color (or a specified color), from the current to the new color. Note this action transitions from the color
at the time the action starts to the specified color.
- Author:
- Nathan Sweet
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PackedColorAction() -
Method Summary
Modifier and Type Method Description protected voidbegin()static PackedColorActioncolor(float color)Sets the actor's color instantly.static PackedColorActioncolor(float color, float duration)Transitions from the color at the time this action starts to the specified color.static PackedColorActioncolor(float color, float duration, com.badlogic.gdx.math.Interpolation interpolation)Transitions from the color at the time this action starts to the specified color.com.badlogic.gdx.graphics.ColorgetColor()floatgetEndColor()voidreset()voidsetColor(com.badlogic.gdx.graphics.Color color)Sets the color to modify.voidsetEndColor(float color)Sets the color to transition to.protected voidupdate(float percent)Methods inherited from class com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
act, end, finish, getDuration, getInterpolation, getTime, isComplete, isReverse, restart, setDuration, setInterpolation, setReverse, setTime
-
Constructor Details
-
PackedColorAction
public PackedColorAction()
-
-
Method Details
-
begin
- Overrides:
beginin classcom.badlogic.gdx.scenes.scene2d.actions.TemporalAction
-
update
- Specified by:
updatein classcom.badlogic.gdx.scenes.scene2d.actions.TemporalAction
-
reset
- Specified by:
resetin interfacecom.badlogic.gdx.utils.Pool.Poolable- Overrides:
resetin classcom.badlogic.gdx.scenes.scene2d.actions.TemporalAction
-
getColor
-
setColor
Sets the color to modify. If null (the default), theactor'scolorwill be used. -
getEndColor
-
setEndColor
Sets the color to transition to. Required. -
color
Sets the actor's color instantly. -
color
Transitions from the color at the time this action starts to the specified color. -
color
public static PackedColorAction color(float color, float duration, com.badlogic.gdx.math.Interpolation interpolation)Transitions from the color at the time this action starts to the specified color.
-