Esempio n. 1
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         EnemyScript es = this.gameObject.GetComponentInParent <EnemyScript>();
         if (es)
         {
             es.AlvoLocalizado(collision.gameObject.transform.position);
         }
     }
 }