For a game I'm programming I need the level to increase everytime the player gets a score that is a multiple of 5. E.g. Level 1 = Score 0. Level 2 = Score 5. Level 3 = Score 10, etc.
This is the kind of code I have already:
But instead of using many many if statements, is there something else like an equation I could use?Code:if (playerScore == 5) { playerLevel++; //Difficulty modifiers bulletSpeed /= (float)playerLevel; goodieSpeed /= (float)playerLevel; bombSpeed *= (float)playerLevel; }
Basically I'm wanting to check if playerScore is a mutliple of 5...
Thanks