Quantcast
Channel: Answers by "TheShadyColombian"
Viewing all articles
Browse latest Browse all 100

Answer by TheShadyColombian

$
0
0
One robust way of doing this is creating a float timer that you add deltaTime to during update, sort of like this. timerActive is a bool that is true when you want the timer to go. void Update () { if (timerActive) { timer += Time.deltaTime; } } and then check and reset the timer like this if (timer >= delay) { //Do stuff timerActive = false; timer = 0; }

Viewing all articles
Browse latest Browse all 100

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>