public IEnumerator FadeOut(bool instant) { if (instant) { toolsFader.SetAlpha(0); } else { yield return(StartCoroutine(TransitionManager.Instance.FadeContent(toolsFader.gameObject, TransitionManager.FadeType.FadeOut, FadeTransitionDuration, FadeOutTransitionCurve))); } }
public IEnumerator FadeOut(bool instant) { while (showHideToolsInTransition) { yield return(null); } if (instant) { toolsFader.SetAlpha(0); } else { showHideToolsInTransition = true; yield return(StartCoroutine(TransitionManager.Instance.FadeContent(toolsFader.gameObject, TransitionManager.FadeType.FadeOut, FadeTransitionDuration, FadeOutTransitionCurve))); showHideToolsInTransition = false; } }