Пример #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         NavigatorMovement agenteEnemigo = transform.parent.GetComponent <NavigatorMovement>();
         agenteEnemigo.Perseguir(other.transform);
     }
 }
 void OnTriggerEnter(Collider other)
 {
     if (other.transform == tank)
     {
         NavigatorMovement agenteEnemigo = other.gameObject.GetComponent <NavigatorMovement>();
         if (!agenteEnemigo.estaPersiguiendo())
         {
             agenteEnemigo.SetNewObjective(otherPatrolPoint);
         }
     }
 }