private void Start() { canvasGroup = GetComponent <CanvasGroup>(); if (canvasGroup != null) { progress = 1f; fadeScreenMode = FadeScreenMode.Hide; inProgress = true; } }
/// <summary> /// Показать /// </summary> public void Show() { if (inProgress) { return; } if (canvasGroup.alpha == 1f) { return; } progress = 0f; fadeScreenMode = FadeScreenMode.Show; inProgress = true; }
/// <summary> /// Скрыть /// </summary> public void Hide() { if (inProgress) { return; } if (canvasGroup.alpha == 0f) { return; } progress = 1f; fadeScreenMode = FadeScreenMode.Hide; inProgress = true; }