private float timer;
public Text txtTimer;
timer = Time.timeSinceLevelLoad;
int minutes = Mathf.FloorToInt(timer / 60F);
int seconds = Mathf.FloorToInt(timer - minutes * 60);
string niceTime = string.Format("{0:0}:{1:00}", minutes, seconds);
txtTimer.text = niceTime;
Comments
Post a Comment