Im looking to make a basic 10 second timer in my game. The code goes along the lines of whats given below, my issue is knowing how long a second is in this fashion, is it 60 for running at 60fps? Or is it something other?
Thanks in Advanced. :)
import greenfoot.*;
public class Timer extends Actor
{
//set variable
private int time = 250;
public void act()
{
//run timer
time --;
//reset timer
while (time == 0)
{
time = 250;
}
}
}
