Package squidpony.squidgrid.gui.gdx
Class PanelEffect.GibberishEffect
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Action
com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
squidpony.squidgrid.gui.gdx.PanelEffect
squidpony.squidgrid.gui.gdx.PanelEffect.ExplosionEffect
squidpony.squidgrid.gui.gdx.PanelEffect.GibberishEffect
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable
- Enclosing class:
- PanelEffect
public static class PanelEffect.GibberishEffect extends PanelEffect.ExplosionEffect
-
Nested Class Summary
Nested classes/interfaces inherited from class squidpony.squidgrid.gui.gdx.PanelEffect
PanelEffect.ExplosionEffect, PanelEffect.GibberishEffect, PanelEffect.GlowBallEffect, PanelEffect.ProjectileEffect, PanelEffect.PulseEffect, PanelEffect.SteadyProjectileEffect
-
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
-
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 com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
act, begin, end, finish, getDuration, getInterpolation, getTime, isComplete, isReverse, reset, restart, setDuration, setInterpolation, setReverse, setTime
-
Field Details
-
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 takeStringKit.PUNCTUATION
and callString.toCharArray()
on it, to this at any time between calls toupdate(float)
(which is usually called indirectly via Stage'sStage.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
-
GibberishEffect
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 affectduration
- the duration of this PanelEffect in seconds, as a floatcenter
- the center of the explosionradius
- 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 affectduration
- the duration of this PanelEffect in seconds, as a floatcenter
- the center of the explosionradius
- 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 affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- 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 affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- 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 affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- the radius of the explosion, in cellscoloring
- 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 affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- the radius of the explosion, in cellscoloring
- 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 affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- the radius of the explosion, in cellscoloring
- 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 affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- the radius of the explosion, in cellscoloring
- 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 onangle
(in degrees) and will cover an amount of the circular area (in degrees) equal tospan
.- Parameters:
targeting
- the IPackedColorPanel to affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- the radius of the explosion, in cellsangle
- the angle, in degrees, that will be the center of the sector-shaped effectspan
- 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 onangle
(in degrees) and will cover an amount of the circular area (in degrees) equal tospan
.- Parameters:
targeting
- the IPackedColorPanel to affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- the radius of the explosion, in cellsangle
- the angle, in degrees, that will be the center of the sector-shaped effectspan
- the span, in degrees, of the full arc at the end of the sector-shaped effectcoloring
- 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 onangle
(in degrees) and will cover an amount of the circular area (in degrees) equal tospan
.- Parameters:
targeting
- the IPackedColorPanel to affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- the radius of the explosion, in cellsangle
- the angle, in degrees, that will be the center of the sector-shaped effectspan
- the span, in degrees, of the full arc at the end of the sector-shaped effectcoloring
- 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 onangle
(in degrees) and will cover an amount of the circular area (in degrees) equal tospan
.- Parameters:
targeting
- the IPackedColorPanel to affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- the radius of the explosion, in cellsangle
- the angle, in degrees, that will be the center of the sector-shaped effectspan
- the span, in degrees, of the full arc at the end of the sector-shaped effectcoloring
- 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 onangle
(in degrees) and will cover an amount of the circular area (in degrees) equal tospan
.- Parameters:
targeting
- the IPackedColorPanel to affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegioncenter
- the center of the explosionradius
- the radius of the explosion, in cellsangle
- the angle, in degrees, that will be the center of the sector-shaped effectspan
- the span, in degrees, of the full arc at the end of the sector-shaped effectcoloring
- an array of colors as packed floats that will replace the default purple spark colors here
-
-
Method Details
-
update
Called each frame.- Overrides:
update
in classPanelEffect.ExplosionEffect
- Parameters:
percent
- The percentage of completion for this action, growing from 0 to 1 over the duration. Ifreversed
, this will shrink from 1 to 0.
-