public static System.Collections.IEnumerator DelayExecute(BoolParmsCallBack preFunc, NoParmsCallBack callback) { yield return(new WaitUntil(() => { return preFunc(); })); callback?.Invoke(); }
// function public static System.Collections.IEnumerator DelayExecute(float time, NoParmsCallBack callback) { yield return(new WaitForSecondsRealtime(time)); callback?.Invoke(); }