Back to project page Terry-Coin.
The source code is released under:
Apache License
If you think the Android project Terry-Coin listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.tcg.terry.managers; // w ww . j ava 2 s .co m public class Timer { private float totalTime; private float currentTime; private boolean count; public Timer(float timer) { this.totalTime = timer; this.currentTime = this.totalTime; count = true; } public void update(float dt) { if(count)currentTime -= dt; } public void stop() { count = false; } public boolean isCounting() { return count; } public long getCurrentTime() { return (long)currentTime; } public void setTotalTime(float totalTime) { this.totalTime = totalTime; } }