Esempio n. 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();
     }
 }
Esempio n. 2
0
 public void Stop()
 {
     ai.Stop();
 }