Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static IEnumerator FadeOutCoRoutine(float delayBefore, float delayAfter, System.Action callback)
- {
- yield return new WaitForSeconds(delayBefore);
- while(group.alpha < 1)
- {
- group.alpha = Mathf.MoveTowards(group.alpha, 1f, instance.speed * Time.deltaTime);
- yield return null;
- }
- yield return new WaitForSeconds(delayAfter);
- if (callback != null) callback();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement