Como rastrear o tempo no Libgdx (android)
Estou desenvolvendo um jogo no qual desejo que o usuário colete bônus a cada 70 segundos. Esse é o meu código para rastrear o tempo, mas não consigo obter a solução. siga nos últimos 4 dias para isso .. :(
long gotime;
long targettime;
float timeleft;
/------------------- Na minha função de renderização ---------/
gotime=(long) Gdx.graphics.getDeltaTime();
gotime=System.currentTimeMillis();
targettime=gotime+70;
if(timeleft>0)
{
timeleft=70 - (gotime - Gdx.graphics.getDeltaTime()) / 1000;//targettime-gotime;
System.out.println("------------"+timeleft);
}