Class AbstractEffect<T>

java.lang.Object
com.simsilica.lemur.effect.AbstractEffect<T>
All Implemented Interfaces:
Effect<T>

public abstract class AbstractEffect<T> extends Object implements Effect<T>
Base implementation of the Effect class that implements standard interface functionality other than the create() method.
  • Constructor Details

    • AbstractEffect

      protected AbstractEffect()
      Creates an effect on the 'null' channel, or undefined channel. Effects that are on the 'null' channel are not tracked.
    • AbstractEffect

      protected AbstractEffect(String channel)
      Creates an effect with the specified channel. Effects that are on the 'null' channel are not tracked.
  • Method Details

    • getChannel

      public String getChannel()
      Description copied from interface: Effect
      Returns the channel name that will be used for looking up existing animations for a given target. Effects that are on the 'null' channel are not tracked in this way. Otherwise, when the effect is run, the channel is used to provide information to the effect about any previous effects that were run. This allows the new effect to adjust its own animations accordingly, either reducing time, starting from a different point, or entirely custom behavior depending on the needs of the effect.
      Specified by:
      getChannel in interface Effect<T>