UnityEngine.Color.Lerp C# (CSharp) Method

Lerp() public static method

public static Lerp ( Color a, Color b, float t ) : Color
a Color
b Color
t float
return Color
		public static Color Lerp(Color a, Color b, float t)
		{
			if (t < 0f)
				return a;
			if (t > 1f)
				return b;
			return (b - a) * t + a;
		}

Usage Example

 // Start is called before the first frame update
 void Start()
 {
     if (!_progressStorageService.HasSaves())
     {
         ContinueButton.interactable = false;
         ContinueText.color          = Color.Lerp(ContinueText.color, new Color(0, 0, 0, 0), 0.5f);
         IconImage.color             = Color.Lerp(IconImage.color, new Color(0, 0, 0, 0), 0.5f);
         _progressStorageService.Destroy();
     }
 }
All Usage Examples Of UnityEngine.Color::Lerp