Example #1
0
 public void GoToFriend()
 {
     if (!friend || !controlAI)
     {
         return;
     }
     if (friendDistance > minFriendDistance)
     {
         controlAI.SetSpeed(friendDistance > minFriendDistance * 2 ? vAIMovementSpeed.Running : vAIMovementSpeed.Walking);
         controlAI.MoveTo(friend.transform.position);
     }
     else
     {
         controlAI.LookTo(friend.transform.position);
         controlAI.Stop();
     }
 }
Example #2
0
 public void MoveToTarget()
 {
     ai.MoveTo(target.position);
     ai.SetSpeed(vAIMovementSpeed.Running);
 }