public abstract class PanelEffect
extends com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
SquidPanel
or SparseLayers
as an
Action
. The PanelEffect class is abstract and has implementations as static
inner classes, such as PanelEffect.ExplosionEffect
. Each PanelEffect specifically affects one IPackedColorPanel
(an interface that both SquidPanel and SparseLayers implement), which can be a layer in a SquidLayers object or a
SquidPanel/SparseLayers on its own. By adding the PanelEffect to any actor using
Actor.addAction(Action)
when the Actor has its act() method called after the
normal map parts of the panel have been placed, the PanelEffect will advance and change what chars/colors are in
the panel as specified in its implementation of the TemporalAction.update(float)
method. Typically the Actor you add this
to is the SquidPanel or SparseLayers this affects, but it could also be a SquidLayers. Most PanelEffect
implementations should allow most configuration to be set in their constructors.
Modifier and Type | Class and Description |
---|---|
static class |
PanelEffect.ExplosionEffect |
static class |
PanelEffect.GibberishEffect |
static class |
PanelEffect.GlowBallEffect |
static class |
PanelEffect.ProjectileEffect |
static class |
PanelEffect.PulseEffect |
static class |
PanelEffect.SteadyProjectileEffect
Almost exactly lke
PanelEffect.ProjectileEffect , but its duration specifies the amount of time to spend crossing each
cell (in seconds), not the duration of the entire effect. |
Modifier and Type | Field and Description |
---|---|
static com.badlogic.gdx.math.Interpolation |
fastInSlowMidFastOut |
IPackedColorPanel |
target |
squidpony.squidmath.GreasedRegion |
validCells |
Modifier | Constructor and Description |
---|---|
protected |
PanelEffect(IPackedColorPanel targeting) |
protected |
PanelEffect(IPackedColorPanel targeting,
float duration) |
protected |
PanelEffect(IPackedColorPanel targeting,
float duration,
squidpony.squidmath.GreasedRegion valid) |
Modifier and Type | Method and Description |
---|---|
static com.badlogic.gdx.scenes.scene2d.Action |
makeGrenadeEffect(PanelEffect.ProjectileEffect projectile,
com.badlogic.gdx.scenes.scene2d.Action result)
Convenience method to make a ProjectileEffect or SteadyProjectileEffect take an "arc-like" path toward the
target, where it is fast at the beginning and end of its motion and is reaching the height of its arc at the
center, before triggering another Action when the projectile stops (often this might be an
PanelEffect.ExplosionEffect , but could be any scene2d Action). |
act, begin, end, finish, getDuration, getInterpolation, getTime, isComplete, isReverse, reset, restart, setDuration, setInterpolation, setReverse, setTime, update
public IPackedColorPanel target
public squidpony.squidmath.GreasedRegion validCells
public static com.badlogic.gdx.math.Interpolation fastInSlowMidFastOut
protected PanelEffect(IPackedColorPanel targeting)
protected PanelEffect(IPackedColorPanel targeting, float duration)
protected PanelEffect(IPackedColorPanel targeting, float duration, squidpony.squidmath.GreasedRegion valid)
public static com.badlogic.gdx.scenes.scene2d.Action makeGrenadeEffect(PanelEffect.ProjectileEffect projectile, com.badlogic.gdx.scenes.scene2d.Action result)
PanelEffect.ExplosionEffect
, but could be any scene2d Action).projectile
- a PanelEffect.ProjectileEffect
(or a subclass of it) to run as the first stepresult
- an Action
to run after the ProjectileEffect completesCopyright © Eben Howard 2012–2022. All rights reserved.