I want to make an actor wait for a certain time and then be able to move again. It waits but is afterwards not able to move again.
int xSpeed = 1;
timer = 0;
public void stop()
{
xSpeed = 0;
if(timer > 5)
{
xSpeed = 1;
timer = 0;
}
timer++;
}


