Class PanelEffect.GibberishEffect

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

public static class PanelEffect.GibberishEffect
extends PanelEffect.ExplosionEffect
  • Nested Class Summary

  • Field Summary

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

    Fields inherited from class squidpony.squidgrid.gui.gdx.PanelEffect.ExplosionEffect

    affected, center, colors, lightMap, radius

    Fields inherited from class squidpony.squidgrid.gui.gdx.PanelEffect

    fastInSlowMidFastOut, target, validCells

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

    actor
  • Constructor Summary

    Constructors 
    Constructor Description
    GibberishEffect​(IPackedColorPanel targeting, float duration, Coord center, int radius)
    Constructs an ExplosionEffect with explicit settings for some fields.
    GibberishEffect​(IPackedColorPanel targeting, float duration, Coord center, int radius, char[] choices)
    Constructs an ExplosionEffect with explicit settings for some fields.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius)
    Constructs an ExplosionEffect with explicit settings for most fields.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, char[] choices)
    Constructs an ExplosionEffect with explicit settings for most fields.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, char[] choices)
    Constructs an ExplosionEffect with explicit settings for most fields; this constructor allows the case where an explosion is directed in a cone or sector shape.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, float[] coloring)
    Constructs an ExplosionEffect 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.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, float[] coloring, char[] choices)
    Constructs an ExplosionEffect 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.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, List<? extends com.badlogic.gdx.graphics.Color> coloring)
    Constructs an ExplosionEffect 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.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, List<? extends com.badlogic.gdx.graphics.Color> coloring, char[] choices)
    Constructs an ExplosionEffect 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.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, float[] coloring)
    Constructs an ExplosionEffect 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.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, float[] coloring, char[] choices)
    Constructs an ExplosionEffect 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.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, List<? extends com.badlogic.gdx.graphics.Color> coloring)
    Constructs an ExplosionEffect 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.
    GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, List<? extends com.badlogic.gdx.graphics.Color> coloring, char[] choices)
    Constructs an ExplosionEffect 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.
    GibberishEffect​(IPackedColorPanel targeting, Coord center, int radius)  
  • Method Summary

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

    Methods inherited from class squidpony.squidgrid.gui.gdx.PanelEffect.ExplosionEffect

    useElectricColors, useFieryColors

    Methods inherited from class squidpony.squidgrid.gui.gdx.PanelEffect

    makeGrenadeEffect

    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 java.lang.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 StringKit.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 approximately once every eighth of a second, and may change sooner if the effect expands more quickly than that.
  • Constructor Details

    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, Coord center, int radius)
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, Coord center, int radius)
      Constructs an ExplosionEffect with explicit settings for some fields. The valid cells this can affect will be the full expanse of the IPackedColorPanel.
      Parameters:
      targeting - the IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      center - the center of the explosion
      radius - the radius of the explosion, in cells
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, Coord center, int radius, char[] choices)
      Constructs an ExplosionEffect with explicit settings for some fields. The valid cells this can affect will be the full expanse of the IPackedColorPanel.
      Parameters:
      targeting - the IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      center - the center of the explosion
      radius - the radius of the explosion, in cells
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius)
      Constructs an ExplosionEffect with explicit settings for most fields.
      Parameters:
      targeting - the IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      center - the center of the explosion
      radius - the radius of the explosion, in cells
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, char[] choices)
      Constructs an ExplosionEffect with explicit settings for most fields.
      Parameters:
      targeting - the IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      center - the center of the explosion
      radius - the radius of the explosion, in cells
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, List<? extends com.badlogic.gdx.graphics.Color> coloring)
      Constructs an ExplosionEffect 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 IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      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
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, List<? extends com.badlogic.gdx.graphics.Color> coloring, char[] choices)
      Constructs an ExplosionEffect 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 IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      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
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, float[] coloring)
      Constructs an ExplosionEffect 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 IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      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
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, float[] coloring, char[] choices)
      Constructs an ExplosionEffect 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 IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      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
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, char[] choices)
      Constructs an ExplosionEffect 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 IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      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
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, List<? extends com.badlogic.gdx.graphics.Color> coloring)
      Constructs an ExplosionEffect 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 IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      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
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, List<? extends com.badlogic.gdx.graphics.Color> coloring, char[] choices)
      Constructs an ExplosionEffect 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 IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      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
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, float[] coloring)
      Constructs an ExplosionEffect 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 IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      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
    • GibberishEffect

      public GibberishEffect​(IPackedColorPanel targeting, float duration, GreasedRegion valid, Coord center, int radius, double angle, double span, float[] coloring, char[] choices)
      Constructs an ExplosionEffect 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 IPackedColorPanel to affect
      duration - the duration of this PanelEffect in seconds, as a float
      valid - the valid cells that can be changed by this PanelEffect, as a GreasedRegion
      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 PanelEffect.ExplosionEffect
      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.