Interface ITimeToLive
- All Known Implementing Classes:
CreatureShadowImageEffect,EllipseParticle,Emitter,EntityEmitter,EntityRotationImageEffect,ImageEffect,LineParticle,OverlayPixelsImageEffect,Particle,PolygonParticle,RectangleParticle,RotationImageEffect,ShapeParticle,SpriteParticle,TextParticle
public interface ITimeToLive
The
ITimeToLive interface defines methods for instances the have a limited time to live.-
Method Summary
Modifier and TypeMethodDescriptionlongGets the time this instance is alive.intGets the total time to live of this instance.booleanDetermines whether this instance has exceeded its time to live.
-
Method Details
-
getAliveTime
long getAliveTime()Gets the time this instance is alive.- Returns:
- Returns how long this instance is alive.
-
getTimeToLive
int getTimeToLive()Gets the total time to live of this instance.- Returns:
- The total time to live.
-
timeToLiveReached
boolean timeToLiveReached()Determines whether this instance has exceeded its time to live.- Returns:
- True if the time to live was reached; otherwise false.
-