예제 #1
0
        /// <summary>
        /// Disapear this instance.
        /// </summary>
        protected virtual void Disapear()
        {
            Color newColor = new Color(0, 0, 0, 0);

            StartCoroutine(FadeEffect.FadeEffectImage(InstructionsPanel, FadeDuration, newColor));
            StartCoroutine(FadeEffect.FadeEffectText(InstructionsText, FadeDuration, newColor));
            Invoke("DestroyInstructions", FadeDuration);
        }
예제 #2
0
 /// <summary>
 /// Fades the fader.
 /// </summary>
 /// <param name="newcolor">Newcolor.</param>
 /// <param name="duration">Duration.</param>
 public virtual void FadeFader(Color newcolor, float duration)
 {
     if (FaderEffect == null)
     {
         return;
     }
     FaderEffect.gameObject.SetActive(true);
     StartCoroutine(FadeEffect.FadeEffectImage(FaderEffect, duration, newcolor));
 }
예제 #3
0
        public virtual void FadeEffectOn(bool state, float duration)
        {
            if (FaderEffect == null)
            {
                return;
            }
            FaderEffect.gameObject.SetActive(true);

            if (state)
            {
                StartCoroutine(FadeEffect.FadeEffectImage(FaderEffect, duration, new Color(0, 0, 0, 1f)));
            }
            else
            {
                StartCoroutine(FadeEffect.FadeEffectImage(FaderEffect, duration, new Color(0, 0, 0, 0f)));
            }
        }