Пример #1
0
    public static IEnumerator WaitAndReturn(PathfindingAgent agent, float duration = 1)
    {
        yield return(new WaitForSeconds(duration));

        agent.transform.localScale = Vector3.one;
        agent.anim.SetTrigger("Walking");
        agent.AssignTarget(agent.origin);
    }