Class PanelEffect

java.lang.Object
com.badlogic.gdx.scenes.scene2d.Action
com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
squidpony.squidgrid.gui.gdx.PanelEffect
All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable
Direct Known Subclasses:
PanelEffect.ExplosionEffect, PanelEffect.GlowBallEffect, PanelEffect.ProjectileEffect

public abstract class PanelEffect
extends com.badlogic.gdx.scenes.scene2d.actions.TemporalAction
Various special effects that can be applied to a 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.
Created by Tommy Ettinger on 5/24/2017.