I have a timer made already that counts down in milliseconds. The timer starts at 0 and counts down but is there any way i can have the timer start at 7 and go down from there? Beginner to coding
public class timerMinus extends Actor
{
int time=07;
/**
* Act - do whatever the counter wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
long pauseTime = 10;
public boolean running()
{
long time = System.currentTimeMillis();
return time > pauseTime;
}
public void pause(long delay )
{
long time = System.currentTimeMillis();
pauseTime = time+delay;
}
public void act()
{
setImage(new GreenfootImage("Time : " + time/100 + " sec", 24, Color.WHITE, Color.BLACK));
if(running())
{
time = time-1;
}
}
}
int time=799;