Can someone explain the logic of the timer here (in detail)?
This code is working well, however i'm just wondering how the timer works (especially the variables of minutes, seconds, and friction).
private var startTime;
var textTime : String;
function Awake() {
startTime = Time.time;
}
function OnGUI () {
var globalTime = Time.time - startTime;
var minutes : int = globalTime / 60;
var seconds : int = globalTime % 60;
var fraction : int = (globalTime * 100) % 100;
textTime = String.Format ("{0:00}:{1:00}:{2:000}", minutes, seconds, fraction);