public Color NextBlendedColour() { ++_currentShade; if (_currentShade > _palette.NoShades) { _paletteIndex = NextPaletteIndex(_paletteIndex); CurrentGradient = _palette.Gradients[_paletteIndex]; _invokeEvents.GradientChanged.Invoke(CurrentGradient); _currentShade = 0; } CurrentBlendedColour = _palette.Gradients[_paletteIndex].BlendedColour(ShadeToRatio(_currentShade)); return(CurrentBlendedColour); }
void TransitionToGradient(VerticalGradient gradient) { _effectMaterial.DOColor(ScaleBrightness(gradient.TopColour, _backgroundGradientConfig.BrightnessScale), TopColourProp, _backgroundGradientConfig.TransitionTime); _effectMaterial.DOColor(ScaleBrightness(gradient.BottomColour, _backgroundGradientConfig.BrightnessScale), BottomColourProp, _backgroundGradientConfig.TransitionTime); }
void Awake() { CurrentGradient = _palette.Gradients[_paletteIndex]; CurrentBlendedColour = CurrentGradient.BottomColour; }
void SetGradient(VerticalGradient gradient) { _effectMaterial.SetColor(TopColourProp, ScaleBrightness(gradient.TopColour, _backgroundGradientConfig.BrightnessScale)); _effectMaterial.SetColor(BottomColourProp, ScaleBrightness(gradient.BottomColour, _backgroundGradientConfig.BrightnessScale)); }