Exemple #1
0
    public static System.Collections.IEnumerator DelayExecute(BoolParmsCallBack preFunc, NoParmsCallBack callback)
    {
        yield return(new WaitUntil(() => { return preFunc(); }));

        callback?.Invoke();
    }
Exemple #2
0
    // function
    public static System.Collections.IEnumerator DelayExecute(float time, NoParmsCallBack callback)
    {
        yield return(new WaitForSecondsRealtime(time));

        callback?.Invoke();
    }