Exemple #1
0
 void Update()
 {
     if (musicHandler && musicHandler.started)
     {
         SetBeatsCircleRadius(curve.Evaluate(musicHandler.GetBeatOffset() + 0.5f));
     }
 }
Exemple #2
0
    public void Update()
    {
        ColorAdjustments colorAdjustments;

        if (postprocess.profile.TryGet <ColorAdjustments>(out colorAdjustments))
        {
            float beat = Mathf.Clamp(musicHandler.GetBeatOffset() * 2.0f, 0.0f, 1.0f);
            //beat = Mathf.Pow(beat, 1.0f / 2.0f);
            beat *= beat;
            colorAdjustments.saturation.value = Mathf.Lerp(currSaturationTarget, 0.0f, beat);
            //colorAdjustments.contrast.value -= 0.5f;
            //colorAdjustments.contrast.value = Mathf.Max(colorAdjustments.contrast.value, 0);
        }
    }