Пример #1
0
 void FixedUpdate()
 {
     hit = Physics2D.OverlapPoint(transform.position, mask);
     if (hit != null)
     {
         Gear g = hit.GetComponent <Gear>();
         if (g != null)
         {
             g.Attach(transform.position);
             gameObject.SetActive(false);
         }
     }
 }