Answer the question
In order to leave comments, you need to log in
How to make a number decrease every second in C # under unity?
I am making a character satiety script and I need the number to decrease by one after some time and at the end, when the number is exactly 0, some actions are performed. Who cares about the time please tell me how to do it.
Answer the question
In order to leave comments, you need to log in
1) Read a book on C #, something for beginners
2) Understand what Update, TIme.deltaTime is in any way possible, for example, using unity tutorials
3) Paint the algorithm for what you need with an eye to paragraph 2
4) Implement the algorithm.
The question is not only primitive, it is also a task. If you can’t implement this, then it’s too early for you in game development
Yes, what's incomprehensible here, you divide Time.deltaTime by Time.deltaTime you get time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question