Esempio n. 1
0
    IEnumerator ResetButtons()
    {
        bool[] resetButtons = { false, false, false, false };
        yield return(new WaitForSeconds(5));

        for (int i = 0; i < 4; ++i)
        {
            int randomNumber;
            do
            {
                randomNumber = Random.Range(0, 4);
            } while (resetButtons[randomNumber]);
            manager.ResetButton(randomNumber);
            resetButtons[randomNumber] = true;
            yield return(new WaitForSeconds(4));
        }
    }