We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 763868d commit fe3c5c8Copy full SHA for fe3c5c8
UOP1_Project/Assets/Scripts/UI/FadeManager.cs
@@ -26,14 +26,15 @@ private void OnDisable()
26
private IEnumerator FadeCoroutine(bool fadeIn, float duration, Color endColor = default)
27
{
28
Color startColor = _imageComponent.color;
29
- if (fadeIn) endColor = Color.clear;
+ if (fadeIn)
30
+ endColor = Color.clear;
31
32
float totalTime = 0f;
33
34
while (totalTime <= duration)
35
36
totalTime += Time.deltaTime;
- _imageComponent.color = Color.Lerp(startColor, endColor, totalTime/duration);
37
+ _imageComponent.color = Color.Lerp(startColor, endColor, totalTime / duration);
38
39
yield return null;
40
}
0 commit comments