Answer the question
In order to leave comments, you need to log in
How to do something 1 time in Update?
I want to make my game, for example, increase the difficulty every 2 minutes, but I could not find on the Internet how to work with time in this way, and therefore I wrote my code like this:
private void FixedUpdate()
{
StartTime += 0.1f * Time.deltaTime;
if (StartTime >= EndTime)
spawnRate--;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question