I am making a matching game like simon. I currently have everything working, and I am using Invoke Repeating in the start method to call my display method to change the click objects
void Start ()
{
ResetGame();
InvokeRepeating("Display", 2, repeatInterval);
}
ResetGame setting the game state to the beginning
then Update simply calls a method to make the first light, and change the state to diplay that the repeating Display function is looking for.
void Update ()
{
if (currentState == Ready)
{
Add();
}
}
Now what I would like to do is be able to change the repeat interval variable when certain conditions are met, but when I change this variable with code there is no increase in speed, I assume do to everything being setup at Start and never called again.
I have tried moving the call to update but it gets called so often the game becomes unplayable fast.
How/Where would I make my display(0 function call to get it to repeat in the same manner as Invoke repeating , but allow the repeatrate (repeatInterval) to be changed when conditions are met?
Thanks for your help in advance