Ejemplo n.º 1
0
 void BeginPursuit(Collider other)
 {
     targetInSight = true;
     lastSighting  = target.transform.position;
     if (!pursuingTarget)
     {
         patrolScript.InterjectTarget(lastSighting);
         doctorMusic.clip = pursuit;
         doctorMusic.Play();
         if (spottedSound != null)
         {
             AudioSource.PlayClipAtPoint(spottedSound, other.transform.position);
         }
     }
     else
     {
         patrolScript.UpdateTargetPosition(other.transform.position);
     }
     pursuingTarget = true;
 }