Ejemplo n.º 1
0
	private IEnumerator HideSubcanvasCoroutine (CanvasController subCC, SubcanvasHideStyle style, object context = null) {
		subCC.CanvasWillHide();

		switch (style) {
		case SubcanvasHideStyle.Instant:
			yield return new WaitForEndOfFrame();
			subCC.Canvas.enabled = false;
			subCC.CanvasGroup.alpha = 0;
			subCC.CanvasDidHide();
			break;
		case SubcanvasHideStyle.FadeOut:
			CrossFadeCanvasGroup(subCC.CanvasGroup, 0, 0.4f);
			yield return new WaitForSeconds(0.4f);
			subCC.Canvas.enabled = false;
			subCC.CanvasDidHide();
			break;
		}
	}