public static IEnumerator DoNap(BehaviourTreeInstance behaviourTreeInstanceState, Action callback = null) { yield return(new WaitForSeconds(3f)); behaviourTreeInstanceState.CompletedAsync(); if (callback != null) { callback(); } }
public static IEnumerator Chasing(BehaviourTreeInstance behaviourTreeInstanceState, Action callback = null) { yield return(new WaitForSeconds(3f)); Debug.Log("End chase"); behaviourTreeInstanceState.CompletedAsync(); if (callback != null) { callback(); } }