W1zzel
1
Hi, i am currently trying to create a Gamewide System which gets the highest score from Google Play Games and then create Stages based on that Score. For example :
Highscore = 1000
- Stage 1 0 - 100 Score
- Stage 2 100-200 Score
- Stage 3 200 -300 Score
and so on. I want to calculate the Stages in my GameManager script and then. based on the current Stage, change some variables in other scripts such as Enemy Spawnrate and so on.
I as a beginner can only think of a switch statement at this point.
What would be the cleanest solution for this ?
Thanks in advance !
Highscore = 999
Calculate stage:
int stage = Mathf.Floor(highscore / 100);
In this case you would get 9 (999/100 = 9.99, Mathf.Floor returns 9)
After calculating stage, multiply spawnrate, speed, etc… by stage number to get incrementing values each time you get on a new stage.
Mathf.Floor