Package nl.colorize.multimedialib.scene
Class Timer
- java.lang.Object
-
- nl.colorize.multimedialib.scene.Timer
-
-
Constructor Summary
Constructors Constructor Description Timer(float duration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattach(java.lang.Runnable action)floatgetDuration()floatgetRatio()floatgetTime()static Timerindefinite()Returns a timer that will run indefinitely and will never complete.booleanisCompleted()voidreset()voidreset(float duration)voidupdate(float deltaTime)Updates this object for the current frame.
-
-
-
Method Detail
-
update
public void update(float deltaTime)
Description copied from interface:UpdatableUpdates this object for the current frame.
-
getTime
public float getTime()
-
getDuration
public float getDuration()
-
isCompleted
public boolean isCompleted()
-
getRatio
public float getRatio()
-
reset
public void reset()
-
reset
public void reset(float duration)
-
attach
public void attach(java.lang.Runnable action)
-
indefinite
public static Timer indefinite()
Returns a timer that will run indefinitely and will never complete.
-
-