예제 #1
0
파일: BigDipper.cs 프로젝트: kijun/art
    /*** 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));
        }
    }