Example #1
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.B))
     {
         StartCoroutine(FadeInOut.FadeImage(a, 3f, A1));
     }
 }
Example #2
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.A))
     {
         StartCoroutine(FadeInOut.FadeImage(image1, 5f, color1));
     }
     else if (Input.GetKeyDown(KeyCode.B))
     {
         StartCoroutine(FadeInOut.FadeImage(image2, 5f, color2));
     }
 }
Example #3
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.A))
     {
         StartCoroutine(FadeInOut.FadeImage(red, 10F, a));
     }
     if (Input.GetKeyDown(KeyCode.B))
     {
         StartCoroutine(FadeInOut.FadeImage(blue, 10F, b));
     }
 }
Example #4
0
 public virtual void FaderOn(bool state, float duration)
 {
     if (fader != null)
     {
         fader.gameObject.SetActive(true);
         if (state == true)
         {
             StartCoroutine(FadeInOut.FadeImage(fader, duration, new Color(0, 0, 0, 1)));
         }
         else
         {
             StartCoroutine(FadeInOut.FadeImage(fader, duration, new Color(0, 0, 0, 0)));
         }
     }
 }
Example #5
0
 public virtual void FaderOn(bool state, float duration)
 {
     if (fader != null)
     {
         fader.gameObject.SetActive(true);
         if (state)
         {
             StartCoroutine(FadeInOut.FadeImage(fader, duration, new Color(0, 0, 0, 1f), GameManager.Instance.Paused));
         }
         else
         {
             StartCoroutine(FadeInOut.FadeImage(fader, duration, new Color(0, 0, 0, 0f), GameManager.Instance.Paused));
         }
     }
 }