i need a timer to count down abilities...for example a jump,or a shot..i want in in every 3second...can somebody help my?(sorry for bad english)
private int shotTimer = 0;
shotTimer = 170;
if (shotTimer > 0) shotTimer--;
if (shotTimer > 0) shotTimer--;
else if (Greenfoot.isKeyDown("space"))
{
shotTimer = 170;
//shoot the bullet
}