|
Hi I'd like to make 2 timers to show on screen. (preferably in Java) They all need to yeild 8 for seconds before starting. I'd like a 3, 2, 1, go - timer and a Countdown timer. I've been trying with lots of different bit I could find, and nothing is working :( Thanks
(comments are locked)
|
|
Here is a link to a basic timer. http://www.youtube.com/watch?v=aHf96fBBYM0 To show them you can do something with OnGUI().
function OnGUI()
{
GUI.TextArea(myRect,timerVarToShow);
}
Make sure to utilize the unity ref for specific functions, vars, overloads, and anything else. Hope this helps, Happy coding! Forgot to add, since the timer var will be a float and you most likely want to show the whole number, add Mathf.CeilToInt which will display the number rounded up to a whole(10.2 becomes 11). There is also Mathf.FloorToInt which rounds down(10.2 becomes 10). Ex
function OnGUI()
{
GUI.TextArea(myRect,Mathf.CeilToInt(timerVarToShow));
}
Mar 08 '12 at 02:04 AM
hijinxbassist
(comments are locked)
|
