in my game, I have a race track model and a car and the race car model has a built in car model so i can animate it and not need AI. but i cannot check the number of laps with the one attached to the track so can somebody please tell me how to set a timer (The animation time is 28 seconds) and how to test to see if it is 28 seconds or less?
Coroutines work well for this
For a more general system implement a custom timer
private float timer = 0;
void Update () {
timer += Time.deltaTime;
// To reset the timer
timer = 0;
// To check against the timer
if(timer > 28){
// Do something
}
}