Class ImageEffect

java.lang.Object
de.gurkenlabs.litiengine.graphics.ImageEffect
All Implemented Interfaces:
ITimeToLive, Comparable<ImageEffect>
Direct Known Subclasses:
CreatureShadowImageEffect, OverlayPixelsImageEffect, RotationImageEffect

public abstract class ImageEffect extends Object implements ITimeToLive, Comparable<ImageEffect>
  • Constructor Details

    • ImageEffect

      protected ImageEffect(String name)
    • ImageEffect

      protected ImageEffect(int ttl, String name)
  • Method Details

    • getAliveTime

      public long getAliveTime()
      Description copied from interface: ITimeToLive
      Gets the time this instance is alive.
      Specified by:
      getAliveTime in interface ITimeToLive
      Returns:
      Returns how long this instance is alive.
    • getName

      public String getName()
    • getTimeToLive

      public int getTimeToLive()
      Description copied from interface: ITimeToLive
      Gets the total time to live of this instance.
      Specified by:
      getTimeToLive in interface ITimeToLive
      Returns:
      The total time to live.
    • timeToLiveReached

      public boolean timeToLiveReached()
      Description copied from interface: ITimeToLive
      Determines whether this instance has exceeded its time to live.
      Specified by:
      timeToLiveReached in interface ITimeToLive
      Returns:
      True if the time to live was reached; otherwise false.
    • getPriority

      public int getPriority()
    • setPriority

      public void setPriority(int priority)
    • setName

      public void setName(String name)
    • compareTo

      public int compareTo(ImageEffect other)
      Specified by:
      compareTo in interface Comparable<ImageEffect>
    • apply

      public abstract BufferedImage apply(BufferedImage image)