4
4
4evest GameDev2021-12-12 10:55:06
Unity
4evest GameDev, 2021-12-12 10:55:06

How to make a C# loop for a game?

I'm making a game (casual, arcade) and because I'm new to programming, I have a problem. I need such a cycle: so that with each +20 in the score, the speed of falling balls changes (but this is not the point). I can then write if the score is 20, then the speed is exactly 4. But this way I will get a very long code. You do not pay attention to speed or something else, the main thing for me is to make a cycle so that one variable is dependent on another. I hope the point is clear.)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2021-12-12
@4evest

What is the cycle here - mathematics grade 3, divide the points by 20 and get the speed level, and then you will make a map - at what level what speed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question