public void Stop()
 {
     this.Log("Stopping");
     if (active)
     {
         StopCoroutine(advanceRoutine);
     }
     backgroundComponent.CrossFadeAlpha(0f, 0f, ignoreTimeScale);
     canvasGroup.CrossFade(false);
     currentSlideNumber    = 0;
     textComponent.text    = string.Empty;
     imageComponent.sprite = null;
     advanceRoutine        = null;
 }
Exemple #2
0
            public void Reset()
            {
                imageComponent.sprite      = null;
                titleTextComponent.text    = descriptionTextComponent.text = string.Empty;
                titleTextComponent.enabled = descriptionTextComponent.enabled = imageComponent.enabled = false;

                progressBar?.Toggle(false);
                continuePromptDisplay?.CrossFade(false);
            }
Exemple #3
0
        private void ToggleVisibility(bool show, float duration)
        {
            Action onFinished = null;

            if (show)
            {
                canvasGroup.gameObject.SetActive(true);
            }
            else
            {
                onFinished = () => canvasGroup.gameObject.SetActive(false);
            }
            canvasGroup.CrossFade(show ? 1f : 0f, show, show, duration, onFinished);
        }
Exemple #4
0
 public static void CrossFade(this CanvasGroup canvasGroup, bool fade, float duration, Action onFinished = null)
 {
     canvasGroup.CrossFade(fade ? 1f : 0f, fade, fade, duration, onFinished);
 }