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

    Fields inherited from class com.badlogic.gdx.scenes.scene2d.Action

    actor, target
  • Constructor Summary

    Constructors 
    Constructor Description
    PackedColorAction()  
  • Method Summary

    Modifier and Type Method Description
    protected void begin()  
    static PackedColorAction color​(float color)
    Sets the actor's color instantly.
    static PackedColorAction color​(float color, float duration)
    Transitions from the color at the time this action starts to the specified color.
    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.
    com.badlogic.gdx.graphics.Color getColor()  
    float getEndColor()  
    void reset()  
    void setColor​(com.badlogic.gdx.graphics.Color color)
    Sets the color to modify.
    void setEndColor​(float color)
    Sets the color to transition to.
    protected void update​(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

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.Action

    getActor, getPool, getTarget, setActor, setPool, setTarget, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • begin

      protected void begin()
      Overrides:
      begin in class com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
    • update

      protected void update​(float percent)
      Specified by:
      update in class com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
    • reset

      public void reset()
      Specified by:
      reset in interface com.badlogic.gdx.utils.Pool.Poolable
      Overrides:
      reset in class com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
    • getColor

      public com.badlogic.gdx.graphics.Color getColor()
    • setColor

      public void setColor​(com.badlogic.gdx.graphics.Color color)
      Sets the color to modify. If null (the default), the actor's color will be used.
    • getEndColor

      public float getEndColor()
    • setEndColor

      public void setEndColor​(float color)
      Sets the color to transition to. Required.
    • color

      public static PackedColorAction color​(float color)
      Sets the actor's color instantly.
    • color

      public static PackedColorAction color​(float color, float duration)
      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.