Class ImageEffect
java.lang.Object
de.gurkenlabs.litiengine.graphics.ImageEffect
- All Implemented Interfaces:
ITimeToLive,Comparable<ImageEffect>
- Direct Known Subclasses:
CreatureShadowImageEffect,OverlayPixelsImageEffect,RotationImageEffect
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedImageEffect(int ttl, String name) protectedImageEffect(String name) -
Method Summary
Modifier and TypeMethodDescriptionabstract BufferedImageapply(BufferedImage image) intcompareTo(ImageEffect other) longGets the time this instance is alive.getName()intintGets the total time to live of this instance.voidvoidsetPriority(int priority) booleanDetermines whether this instance has exceeded its time to live.
-
Constructor Details
-
ImageEffect
-
ImageEffect
-
-
Method Details
-
getAliveTime
public long getAliveTime()Description copied from interface:ITimeToLiveGets the time this instance is alive.- Specified by:
getAliveTimein interfaceITimeToLive- Returns:
- Returns how long this instance is alive.
-
getName
-
getTimeToLive
public int getTimeToLive()Description copied from interface:ITimeToLiveGets the total time to live of this instance.- Specified by:
getTimeToLivein interfaceITimeToLive- Returns:
- The total time to live.
-
timeToLiveReached
public boolean timeToLiveReached()Description copied from interface:ITimeToLiveDetermines whether this instance has exceeded its time to live.- Specified by:
timeToLiveReachedin interfaceITimeToLive- Returns:
- True if the time to live was reached; otherwise false.
-
getPriority
public int getPriority() -
setPriority
public void setPriority(int priority) -
setName
-
compareTo
- Specified by:
compareToin interfaceComparable<ImageEffect>
-
apply
-