示例#1
0
        protected virtual void Disappear()
        {
            Color newColor = new Color(0, 0, 0, 0);

            StartCoroutine(CorgiTools.FadeImage(InstructionsPanel, FadeDuration, newColor));
            StartCoroutine(CorgiTools.FadeText(InstructionsText, FadeDuration, newColor));
            Invoke("DestroyInstructions", FadeDuration);
        }
示例#2
0
 /// <summary>
 /// Fades the fader in or out depending on the state
 /// </summary>
 /// <param name="state">If set to <c>true</c> fades the fader in, otherwise out if <c>false</c>.</param>
 public virtual void FaderOn(bool state, float duration)
 {
     Fader.gameObject.SetActive(true);
     if (state)
     {
         StartCoroutine(CorgiTools.FadeImage(Fader, duration, new Color(0, 0, 0, 1f)));
     }
     else
     {
         StartCoroutine(CorgiTools.FadeImage(Fader, duration, new Color(0, 0, 0, 0f)));
     }
 }