//sets level stats private void SetLevelStats() { //calculate final score levelStats.EndLevelScoreCalc(); //set score UI score = levelStats.LevelScore; ScoreTxt.text = score.ToString(); //set time UI time = levelStats.LevelTime; int minutes = (int)time / 60; int seconds = (int)time % 60; int fraction = (int)(time * 100) % 100; TimeTxt.text = string.Format("{0:00} : {1:00} : {2:00}", minutes, seconds, fraction); }