public static IEnumerator ExecuteQueuedShowLater(genericFunction onEnd) { foreach (genericFunction showCatCollapse in Cat.showLater) { yield return(new WaitForSeconds(delayCollapseForSeconds)); showCatCollapse(); } Cat.showLater = new List <genericFunction>(); onEnd(); }
private void AddToShowLater(genericFunction toDestroy) { showLater.Add(toDestroy); }