1

So, if the player hit the finish line the game will be done and go to "FinishScene". In "FinishScene" i want the timer result to appear on the finish scene, so the player know how much time did the player use to make 'til the end.

I already watch so many youtube videos but it doesn't help me. Hope someone could help me!

Timer Script:

public Text timerText;
private float startTime;

void Start()
{
    startTime = Time.time;
}

void Update()
{
    float t = Time.time - startTime;

    string minutes = ((int) t / 60).ToString();
    string seconds = (t % 60).ToString("f2");

    timerText.text = minutes + ":" + seconds;
}

Finish Scene: Finish Scene Photo

Trying to pass timer result.

DiplomacyNotWar
  • 31,605
  • 6
  • 57
  • 75
awz
  • 11
  • 2

0 Answers0