예제 #1
0
    void Update()
    {
        if (!aiActive)
        {
            return;
        }
        //update state
        currentState.UpdateState(this);

        //set animation speed
        anim.SetAnimatorSpeed(agent.velocity.magnitude);
    }