/// <summary> /// Start the fade in animation with a speed /// </summary> public void FadeIn(float speed) { if (!faded) { return; } faded = false; anim.SetFloat("Speed", speed); anim.SetTrigger("Toggle"); FadeInStartedEvent?.Invoke(); }
/// <summary> /// Start the fade in animation with a speed /// </summary> public void FadeIn(float speed = 1f) { if (!faded) { return; } faded = false; fadeImage.color = fadeColor; anim.SetFloat(speedHash, this.speed = speed); anim.SetBool(openHash, true); FadeInStartedEvent?.Invoke(); StartCoroutine(HandleFadedIn()); }