I would like to invokerepeating and instantiate some prefabs based on the current (and changing) value of BallController.score
void Start(){
if (BallController.score>100)
{
InvokeRepeating("Blockers", 1f, 1f);
}
}
void Blockers() {
if (BallController.score > 100)
{
Instantiate(MakinBlockers);
}
}
Currently my code only starts InvokeRepeating(“Blockers”) if the game is stopped and started over again with a score of more than 100. Where do I need to put InvokeRepeating to make it check the score more often?