Hi! At the moment, I'm trying to develop a game with C# and Unity where you earn money while the game is opened or even closed. In my game I have:
- speed (2 speed = 1 / 2 = 0.5 secs to earn money)
- delay (1 delay = 1 sec waited to "loop" again)
Example:
Speed is 3 and delay is 0.5. So it takes 0.33 (1/3) secs to earn money and waits 0.5 secs before starting the "loop" again.
Although it runs correctly with the game opened, I don't know how to calculate how many times you've earned money outside the game.
I already have the amount of seconds that have passed since you've closed the game so far.