Example #1
0
 IEnumerator FadeIn(float delta = 0.01f, ThenFunc then = null)
 {
     for (var f = 1f; f <= 1f; f -= delta)
     {
         var c = Curtain.color;
         c.a           = f;
         Curtain.color = c;
         yield return(null);
     }
     then?.Invoke();
 }
Example #2
0
 IEnumerator FadeOut(float delta = 0.01f, ThenFunc then = null)
 {
     for (var f = 0f; f <= 1f; f += delta)
     {
         var c = Curtain.color;
         c.a           = f;
         Curtain.color = c;
         Debug.Log($"{f}");
         yield return(null);
     }
     then?.Invoke();
 }
Example #3
0
 public IThenable Then(ThenFunc f = null)
 {
     TaskList.Add(f);
     return(this);
 }