Class GridAction.GibberishAction
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Action
com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
com.github.yellowstonegames.glyph.GridAction
com.github.yellowstonegames.glyph.GridAction.ExplosionAction
com.github.yellowstonegames.glyph.GridAction.GibberishAction
- All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.actions.FinishableAction, com.badlogic.gdx.utils.Pool.Poolable
- Enclosing class:
GridAction
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
Nested classes/interfaces inherited from class GridAction
GridAction.CloudAction, GridAction.ExplosionAction, GridAction.GibberishAction, GridAction.PulseAction, GridAction.TintAction -
Field Summary
FieldsModifier and TypeFieldDescriptionchar[]This char array contains all characters that can be used in the foreground of this effect.Fields inherited from class GridAction.ExplosionAction
affected, center, colors, lightMap, radius, seedFields inherited from class GridAction
grid, GUI_RANDOM, validFields inherited from class com.badlogic.gdx.scenes.scene2d.Action
actor, target -
Constructor Summary
ConstructorsConstructorDescriptionGibberishAction(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
Methods inherited from class GridAction.ExplosionAction
useAcridColors, useElectricColors, useFieryColors, useMistyColors, useToxicColorsMethods inherited from class com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
act, begin, end, finish, getDuration, getInterpolation, getTime, isComplete, isReverse, reset, restart, setDuration, setInterpolation, setReverse, setTimeMethods inherited from class com.badlogic.gdx.scenes.scene2d.Action
getActor, getPool, getTarget, setActor, setPool, setTarget, toString
-
Field Details
-
choices
public char[] choicesThis 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 takeStringTools.PUNCTUATIONand 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 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 affectcenter- the center of the explosionradius- 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 affectduration- the duration of this GridAction in seconds, as a floatcenter- the center of the explosionradius- 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 affectduration- the duration of this GridAction in seconds, as a floatcenter- the center of the explosionradius- the radius of the explosion, in cellschoices- 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 affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- the center of the explosionradius- 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 affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- the center of the explosionradius- 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 affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- 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
-
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 affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- 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
-
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 affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- 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
-
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 affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- 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
-
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 onangle(in degrees) and will cover an amount of the circular area (in degrees) equal tospan.- Parameters:
targeting- the GlyphGrid to affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- 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
-
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 onangle(in degrees) and will cover an amount of the circular area (in degrees) equal tospan.- Parameters:
targeting- the GlyphGrid to affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- 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
-
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 onangle(in degrees) and will cover an amount of the circular area (in degrees) equal tospan.- Parameters:
targeting- the GlyphGrid to affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- 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
-
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 onangle(in degrees) and will cover an amount of the circular area (in degrees) equal tospan.- Parameters:
targeting- the GlyphGrid to affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- 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
-
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 onangle(in degrees) and will cover an amount of the circular area (in degrees) equal tospan.- Parameters:
targeting- the GlyphGrid to affectduration- the duration of this GridAction in seconds, as a floatvalid- the valid cells that can be changed by this GridAction, as a Regioncenter- 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
protected void update(float percent) Called each frame.- Overrides:
updatein classGridAction.ExplosionAction- 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.
-