Android Open Source - KillMarmotGame My Timer






From Project

Back to project page KillMarmotGame.

License

The source code is released under:

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUC...

If you think the Android project KillMarmotGame listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package ru.levrun.libgdx_demo;
//from ww w. j a  v  a  2 s .  c om
import com.badlogic.gdx.utils.TimeUtils;

public class MyTimer {
  private long start;
    private long secsToWait;

    public MyTimer(long secsToWait) {
        this.secsToWait = secsToWait;
    }

    public void start() {
        start = TimeUtils.millis() / 1000;
    }

    public boolean hasCompleted() {
        return TimeUtils.millis() / 1000 - start >= secsToWait;
    }
}




Java Source Code List

ru.levrun.libgdx_demo.GameUtils.java
ru.levrun.libgdx_demo.Game.java
ru.levrun.libgdx_demo.MainActivity.java
ru.levrun.libgdx_demo.Marmot.java
ru.levrun.libgdx_demo.MyTimer.java