- Home /
adding hours in minute and seconds script?
var minutes : int = guiTime / 60; //Divide the guiTime by sixty to get the minutes.
var seconds : int = guiTime % 60;//Use the euclidean division for the seconds.
var fraction : int = (guiTime * 100) % 100;
textTime = String.Format ("{0:00}:{1:00}:{2:00}" minutes, seconds, fraction);
Answer by getyour411 · Jan 18, 2014 at 10:57 PM
this script is okay but iwant to add hours sir.. -_- im crazy by adding var hours : int = guiTime..?
textTime = String.Format ("{0:00}:{1:00}:{2:00}:{3:00}" hours, $$anonymous$$utes, seconds, fraction);
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to import the object from server to unity 2 Answers
How do I implement a timer into this script that will record the total time the player has played. 2 Answers
Can someone help me fix my Javascript for Flickering Light? 6 Answers