protected virtual void Disappear() { Color newColor = new Color(0, 0, 0, 0); StartCoroutine(MMFade.FadeImage(InstructionsPanel, FadeDuration, newColor)); StartCoroutine(MMFade.FadeText(InstructionsText, FadeDuration, newColor)); Invoke("DestroyInstructions", FadeDuration); }
/// <summary> /// Fades the dialogue box out. /// </summary> /// <param name="duration">Duration.</param> public virtual void FadeOut(float duration) { Color newBackgroundColor = new Color(_backgroundColor.r, _backgroundColor.g, _backgroundColor.b, 0); Color newTextColor = new Color(_textColor.r, _textColor.g, _textColor.b, 0); StartCoroutine(MMFade.FadeCanvasGroup(TextPanelCanvasGroup, duration, 0f)); StartCoroutine(MMFade.FadeText(DialogueText, duration, newTextColor)); StartCoroutine(MMFade.FadeCanvasGroup(Prompt, duration, 0f)); }
/// <summary> /// Fades the dialogue box out. /// </summary> /// <param name="duration">Duration.</param> public virtual void FadeOut(float duration) { Color newBackgroundColor = new Color(_backgroundColor.r, _backgroundColor.g, _backgroundColor.b, 0); Color newTextColor = new Color(_textColor.r, _textColor.g, _textColor.b, 0); StartCoroutine(MMFade.FadeImage(TextPanel, duration, newBackgroundColor)); StartCoroutine(MMFade.FadeImage(TextPanelArrowDown, duration, newBackgroundColor)); StartCoroutine(MMFade.FadeText(DialogueText, duration, newTextColor)); StartCoroutine(MMFade.FadeSprite(_buttonSpriteRenderer, duration, new Color(1f, 1f, 1f, 0f))); }
/// <summary> /// Fades the dialogue box in. /// </summary> /// <param name="duration">Duration.</param> public virtual void FadeIn(float duration) { if (TextPanelCanvasGroup != null) { StartCoroutine(MMFade.FadeCanvasGroup(TextPanelCanvasGroup, duration, 1f)); } if (DialogueText != null) { StartCoroutine(MMFade.FadeText(DialogueText, duration, _textColor)); } if (Prompt != null) { StartCoroutine(MMFade.FadeCanvasGroup(Prompt, duration, 1f)); } }
/// <summary> /// Fades the dialogue box in. /// </summary> /// <param name="duration">Duration.</param> public virtual void FadeIn(float duration) { if (TextPanel != null) { StartCoroutine(MMFade.FadeImage(TextPanel, duration, _backgroundColor)); } if (TextPanelArrowDown != null) { StartCoroutine(MMFade.FadeImage(TextPanelArrowDown, duration, _backgroundColor)); } if (DialogueText != null) { StartCoroutine(MMFade.FadeText(DialogueText, duration, _textColor)); } if (_buttonSpriteRenderer != null) { StartCoroutine(MMFade.FadeSprite(_buttonSpriteRenderer, duration, new Color(1f, 1f, 1f, 1f))); } }