#Idle Upgrade that takes time to build
1 messages · Page 1 of 1 (latest)
For whoever clicks on the thread, are you familiar with the monuments from Idling To Rule The Gods or NGU Idle's augments? If you are, then that'll make it slightly easier to explain what I'm trying to accomplish.
Coroutines should do the trick: https://docs.unity3d.com/ScriptReference/MonoBehaviour.StartCoroutine.html
You can just call one and use yield return new WaitForSeconds(yourWaitTime);
Ok, thanks. I'll experiment with them a bit
You can also yield while loops inside the coroutine and decrease the a float from Time.deltaTime if you want to keep track of its duration decreasing and etc
If you want it to do things while the game is closed... You will need to actually cache the DateTime that you started the upgrade and calculate a difference in time
So I have this in an attempt for the first upgrade, spires, but the timer I made isn't decreasing. Any ideas?