Class ImageEffect

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

public abstract class ImageEffect
extends java.lang.Object
implements ITimeToLive, java.lang.Comparable<ImageEffect>
  • Constructor Summary

    Constructors 
    ModifierConstructorDescription
    protected ImageEffect​(int ttl, java.lang.String name) 
    protected ImageEffect​(java.lang.String name) 
  • Method Summary

    Modifier and TypeMethodDescription
    abstract java.awt.image.BufferedImageapply​(java.awt.image.BufferedImage image) 
    intcompareTo​(ImageEffect other) 
    longgetAliveTime()
    Gets the time this instance is alive.
    java.lang.StringgetName() 
    intgetPriority() 
    intgetTimeToLive()
    Gets the total time to live of this instance.
    voidsetName​(java.lang.String name) 
    voidsetPriority​(int priority) 
    booleantimeToLiveReached()
    Determines whether this instance has exceeded its time to live.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImageEffect

      protected ImageEffect​(java.lang.String name)
    • ImageEffect

      protected ImageEffect​(int ttl, java.lang.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 java.lang.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​(java.lang.String name)
    • compareTo

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

      public abstract java.awt.image.BufferedImage apply​(java.awt.image.BufferedImage image)