- Home /
Best Answer
Answer by code_warrior · Jan 02, 2015 at 06:40 PM
Hi Abacab,
I would create a bool private variable (like buttonPressed) which you could initialise with false. You then have to to create a function (like gas function() ) where you check if the buttonPressed is still false, then call your timer function. You then also need to set the buttonPressed to true, that way you can be sure the function is only called once.
If you are using the new UI System you can easily assign assign the "gas function" to your button.
Your answer
Follow this Question
Related Questions
How to make a timer read to the .001 of a second 2 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
C#: Making a timer 1 Answer
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer