Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (!BeatManager.IsSetup())
        {
            return;
        }
        switch (beatCounter)
        {
        case 0:
            if (BeatManager.OffBeatPercent() >= 0.25)
            {
                CentreBeat.enabled = false;
                Outer.SetImageActive(true);
                beatCounter = 1;
            }
            break;

        case 1:
            if (BeatManager.OffBeatPercent() >= 0.5)
            {
                Outer.SetImageActive(false);
                Middle.SetImageActive(true);
                beatCounter = 2;
            }
            break;

        case 2:
            if (BeatManager.OffBeatPercent() >= 0.75)
            {
                Middle.SetImageActive(false);
                Inner.SetImageActive(true);
                beatCounter = 3;
            }
            break;

        default:
            break;
        }
    }