Class GridAction.GibberishAction

java.lang.Object
com.badlogic.gdx.scenes.scene2d.Action
com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.actions.FinishableAction, com.badlogic.gdx.utils.Pool.Poolable
Enclosing class:
GridAction

public static class GridAction.GibberishAction extends GridAction.ExplosionAction
An effect that acts like an GridAction.ExplosionAction, but instead of changing the background colors, this changes the foreground glyph to a randomly-selected character from choices. The colors used for the foreground glyphs can be modified using the same methods that ExplosionAction has, such as GridAction.ExplosionAction.useAcridColors().
  • Nested Class Summary

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    char[]
    This char array contains all characters that can be used in the foreground of this effect.

    Fields inherited from class GridAction

    grid, GUI_RANDOM, valid

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

    actor, target
  • Constructor Summary

    Constructors
    Constructor
    Description
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Coord center, int radius)
    Constructs an GibberishAction with explicit settings for some fields.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Coord center, int radius, char[] choices)
    Constructs an GibberishAction with explicit settings for some fields.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius)
    Constructs an GibberishAction with explicit settings for most fields.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, char[] choices)
    Constructs an GibberishAction with explicit settings for most fields.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, char[] choices)
    Constructs an GibberishAction with explicit settings for most fields; this constructor allows the case where an explosion is directed in a cone or sector shape.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, int[] coloring)
    Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors; this constructor allows the case where an explosion is directed in a cone or sector shape.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, int[] coloring, char[] choices)
    Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors; this constructor allows the case where an explosion is directed in a cone or sector shape.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, com.github.tommyettinger.ds.IntList coloring)
    Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors; this constructor allows the case where an explosion is directed in a cone or sector shape.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, com.github.tommyettinger.ds.IntList coloring, char[] choices)
    Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors; this constructor allows the case where an explosion is directed in a cone or sector shape.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, int[] coloring)
    Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, int[] coloring, char[] choices)
    Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, com.github.tommyettinger.ds.IntList coloring)
    Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors.
    GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, com.github.tommyettinger.ds.IntList coloring, char[] choices)
    Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors.
    GibberishAction(GlyphGrid targeting, com.github.yellowstonegames.grid.Coord center, int radius)
    Constructs an GibberishAction with explicit settings for some fields.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    update(float percent)
    Called each frame.

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.actions.TemporalAction

    act, begin, end, finish, getDuration, getInterpolation, getTime, isComplete, isReverse, reset, 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 Object

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

    • choices

      public char[] choices
      This char array contains all characters that can be used in the foreground of this effect. You can assign another char array, such as if you take StringTools.PUNCTUATION and call String.toCharArray() on it, to this at any time between calls to update(float) (which is usually called indirectly via Stage's Stage.act() method if this has been added to an Actor on that Stage). These chars are pseudo-randomly selected every time the percent completed changes.
  • Constructor Details

    • GibberishAction

      public GibberishAction(GlyphGrid targeting, com.github.yellowstonegames.grid.Coord center, int radius)
      Constructs an GibberishAction with explicit settings for some fields. Uses electric colors. Has a duration of 1 second.
      Parameters:
      targeting - the GlyphGrid to affect
      center - the center of the explosion
      radius - the radius of the explosion, in cells
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Coord center, int radius)
      Constructs an GibberishAction with explicit settings for some fields. Uses electric colors.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      center - the center of the explosion
      radius - the radius of the explosion, in cells
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Coord center, int radius, char[] choices)
      Constructs an GibberishAction with explicit settings for some fields. Uses electric colors.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      choices - all characters that can be used in the foreground of this effect
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius)
      Constructs an GibberishAction with explicit settings for most fields. Uses electric colors.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, char[] choices)
      Constructs an GibberishAction with explicit settings for most fields. Uses electric colors.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, com.github.tommyettinger.ds.IntList coloring)
      Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      coloring - a List of Color or subclasses thereof that will replace the default purple spark colors here
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, com.github.tommyettinger.ds.IntList coloring, char[] choices)
      Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      coloring - a List of Color or subclasses thereof that will replace the default purple spark colors here
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, int[] coloring)
      Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      coloring - an array of colors as packed floats that will replace the default purple spark colors here
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, int[] coloring, char[] choices)
      Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      coloring - an array of colors as packed floats that will replace the default purple spark colors here
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, char[] choices)
      Constructs an GibberishAction with explicit settings for most fields; this constructor allows the case where an explosion is directed in a cone or sector shape. It will center the sector on angle (in degrees) and will cover an amount of the circular area (in degrees) equal to span.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      angle - the angle, in degrees, that will be the center of the sector-shaped effect
      span - the span, in degrees, of the full arc at the end of the sector-shaped effect
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, com.github.tommyettinger.ds.IntList coloring)
      Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors; this constructor allows the case where an explosion is directed in a cone or sector shape. It will center the sector on angle (in degrees) and will cover an amount of the circular area (in degrees) equal to span.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      angle - the angle, in degrees, that will be the center of the sector-shaped effect
      span - the span, in degrees, of the full arc at the end of the sector-shaped effect
      coloring - a List of Color or subclasses thereof that will replace the default purple spark colors here
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, com.github.tommyettinger.ds.IntList coloring, char[] choices)
      Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors; this constructor allows the case where an explosion is directed in a cone or sector shape. It will center the sector on angle (in degrees) and will cover an amount of the circular area (in degrees) equal to span.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      angle - the angle, in degrees, that will be the center of the sector-shaped effect
      span - the span, in degrees, of the full arc at the end of the sector-shaped effect
      coloring - a List of Color or subclasses thereof that will replace the default purple spark colors here
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, int[] coloring)
      Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors; this constructor allows the case where an explosion is directed in a cone or sector shape. It will center the sector on angle (in degrees) and will cover an amount of the circular area (in degrees) equal to span.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      angle - the angle, in degrees, that will be the center of the sector-shaped effect
      span - the span, in degrees, of the full arc at the end of the sector-shaped effect
      coloring - an array of colors as packed floats that will replace the default purple spark colors here
    • GibberishAction

      public GibberishAction(GlyphGrid targeting, float duration, com.github.yellowstonegames.grid.Region valid, com.github.yellowstonegames.grid.Coord center, int radius, float angle, float span, int[] coloring, char[] choices)
      Constructs an GibberishAction with explicit settings for most fields but also an alternate group of Color objects that it will use to color the explosion instead of using purple spark colors; this constructor allows the case where an explosion is directed in a cone or sector shape. It will center the sector on angle (in degrees) and will cover an amount of the circular area (in degrees) equal to span.
      Parameters:
      targeting - the GlyphGrid to affect
      duration - the duration of this GridAction in seconds, as a float
      valid - the valid cells that can be changed by this GridAction, as a Region
      center - the center of the explosion
      radius - the radius of the explosion, in cells
      angle - the angle, in degrees, that will be the center of the sector-shaped effect
      span - the span, in degrees, of the full arc at the end of the sector-shaped effect
      coloring - an array of colors as packed floats that will replace the default purple spark colors here
  • Method Details

    • update

      protected void update(float percent)
      Called each frame.
      Overrides:
      update in class GridAction.ExplosionAction
      Parameters:
      percent - The percentage of completion for this action, growing from 0 to 1 over the duration. If reversed, this will shrink from 1 to 0.