Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 void TransitionToGradient(VerticalGradient gradient)
 {
     _effectMaterial.DOColor(ScaleBrightness(gradient.TopColour, _backgroundGradientConfig.BrightnessScale), TopColourProp, _backgroundGradientConfig.TransitionTime);
     _effectMaterial.DOColor(ScaleBrightness(gradient.BottomColour, _backgroundGradientConfig.BrightnessScale), BottomColourProp, _backgroundGradientConfig.TransitionTime);
 }
Ejemplo n.º 3
0
 void Awake()
 {
     CurrentGradient      = _palette.Gradients[_paletteIndex];
     CurrentBlendedColour = CurrentGradient.BottomColour;
 }
Ejemplo n.º 4
0
 void SetGradient(VerticalGradient gradient)
 {
     _effectMaterial.SetColor(TopColourProp, ScaleBrightness(gradient.TopColour, _backgroundGradientConfig.BrightnessScale));
     _effectMaterial.SetColor(BottomColourProp, ScaleBrightness(gradient.BottomColour, _backgroundGradientConfig.BrightnessScale));
 }