I'm making an endless runner game with Unity and in this game for every 10 coins I collect, it increases the level by 1 with a maximum of 10. Currently, I'm doing this:
IF(coins >= 10 and coins < 20) level = 2
IF(coins >= 20 and coins <= 30) level = 3
and so on till level 10.
But I'm sure that this code is badly written, I'm thinking in use the for statement but I'm a newbie to C#, any ideas?