Beispiel #1
0
 private IEnumerator DoCrossFade(float time, OnHalfwayThroughCrossfade callback) {
     FadeOut(time * 0.45f);
     yield return new WaitForSeconds(time * 0.5f);
     if (callback != null) {
         callback();
     }
     yield return new WaitForSeconds(time * 0.05f);
     FadeIn(time * 0.45f);
 }
Beispiel #2
0
 public void CrossFade(float time, OnHalfwayThroughCrossfade callback = null) {
     StartCoroutine(DoCrossFade(time, callback));
 }