コード例 #1
0
 void GetDistanceToNextTarget()
 {
     if (Vector3.Distance(ai.controller._goal.transform.position, transform.position) < 2f)
     {
         targetTimer = ai.targetResetTime;
         ai.SetRandomGoal();
     }
 }
コード例 #2
0
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        ai         = animator.GetComponent <JumpRaptor>();
        perception = animator.GetComponent <Perception>();
        transform  = animator.transform;

        targetTimer = ai.targetResetTime;

        ai.SetRandomGoal();
    }