Example #1
0
    public static IEnumerator DoNap(BehaviourTreeInstance behaviourTreeInstanceState, Action callback = null)
    {
        yield return(new WaitForSeconds(3f));

        behaviourTreeInstanceState.CompletedAsync();

        if (callback != null)
        {
            callback();
        }
    }
Example #2
0
    public static IEnumerator Chasing(BehaviourTreeInstance behaviourTreeInstanceState, Action callback = null)
    {
        yield return(new WaitForSeconds(3f));

        Debug.Log("End chase");
        behaviourTreeInstanceState.CompletedAsync();

        if (callback != null)
        {
            callback();
        }
    }