Class GdxTimer
java.lang.Object
com.devcharles.piazzapanic.utility.GdxTimer
Simple timer class suitable for this project.
Modified for this project.
- Author:
- tedigc
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
delay
private int delay -
elapsed
private int elapsed -
running
private boolean running -
looping
private boolean looping
-
-
Constructor Details
-
GdxTimer
public GdxTimer(int delay, boolean running, boolean looping) Create a timer.- Parameters:
delay
- delay in milliseconds.running
- whether the timer is running when it's createdlooping
- does the timer restart itself after elapsing.
-
-
Method Details
-
tick
public boolean tick(float delta) Progress the timer- Parameters:
delta
- time since last frame.- Returns:
- Whether the timer is finished.
-
start
public void start() -
stop
public void stop() -
reset
public void reset()Reset the timer. This does not stop it, for that useGdxTimer.stop()
-