I have a score script that increases the score over time, but I am wondering how I could do an action on every 100 points, here is what I got so far:
void FixedUpdate () {
if (scoreTimer == true) {
scoreCount += 0.005f * speedUp.move;
scoreText.text = scoreCount.ToString ("F0");
}
if (scoreTimer == false)
{
scoreCount +=0.0f;
scoreText.text = scoreCount.ToString("F0");
PlayerPrefs.SetFloat("Player Score", scoreCount);
}
}
I have looked around for solutions but not really sure where to start.
I thought about doing something like this:
if (scoreCount == 100) {
"Do something"
{
But that wouldn’t update every 100 score only the first time.
Thanks in advance