Пример #1
0
    /*** ROUTINE ***/
    IEnumerator FnChangeColor(int durationInBeats, int minRest, int maxRest, Color color)
    {
        int beatsRested = 0;

        while (beatsRested < durationInBeats)
        {
            board.RandomGraphicEntity().SetColor(color);
            var beatsToRest = Random.Range(minRest, maxRest);
            beatsRested += beatsToRest;
            yield return(Rest(0, beatsToRest));
        }
    }
Пример #2
0
    IEnumerator Section1Orange(int durationInBeats, int minRest, int maxRest)
    {
        int beatsRested = 0;

        while (beatsRested < durationInBeats)
        {
            var g = board.RandomGraphicEntity();
            if (g != null)
            {
                g.SetColor(orange);
            }
            var beatsToRest = Random.Range(minRest, maxRest);
            beatsRested += beatsToRest;
            yield return(Rest(0, beatsToRest));
        }
    }