Call A Function At A Certain Time

So, I will call the function once when the score is the multiple of 500. However, I’m stuck because I could call the function once at 500, but then it would be stuck at 1000 and the values wouldn’t change.

void Update ()

{

 if (ScoreManager.score % 500 == 0 && ScoreManager.score > 0 && increaseLevel == true)
      IncreaseLevel (ScoreManager.score);

}

void IncreaseLevel (int score)

{

 if (speed > 0)
	speed = speed + 5;
else if (speed < 0)
	speed = speed - 5;

if (dropAppleSeconds <= 0.05f)
	dropAppleSeconds = 0.01f;
else
     dropAppleSeconds = dropAppleSeconds - 0.05f;

if (score % 1000 == 0)
	changeDirectionRate = changeDirectionRate + 0.05f;

increaseLevel = false;

}

How about:

private int scoreAtWhichLevelLastIncreased = 0;

Update() {
  if (ScoreManager.score % 500 == 0 && ScoreManager.score > scoreAtWhichLevelLastIncreased) {
    IncreaseLevel (ScoreManager.score);
  }
}

void IncreaseLevel(int score) {
// Do stuff

  scoreAtWhichLevelLastIncreased = score;
}