I have set up a timer for my game, however I would like to remove the numbers after the decimal and display the time in whole seconds. I just don't know how I would do that, any advice would be great.
(comments are locked)
|
|
Here's the most optimized way. See my answer. http://answers.unity3d.com/questions/25979/timer-display-question/25984#25984 Use InvokeRepeating() and you will save method calls meaning faster performance for the same result.
(comments are locked)
|
|
just do this:
change to
by parsing the value into an integer the timer automatically returns you whole numbers.
(comments are locked)
|
|
Use Mathf.Floor(value) to get the next smaller integer number. Use Mathf.Ceil(value) to get the next bigger integer number.
(comments are locked)
|
