Пример #1
0
 void HandleInteraction()
 {
     if (m_objectInHands)
     {
         DropTheThing();
         MyEvent3.Post(gameObject);
     }
     else
     {
         var obj = FindClosestObjectInRange();
         if (obj)
         {
             m_objectInHands = obj;
             m_objectInHands.OnPickup(gameObject);
             MyEvent3.Post(gameObject);
         }
     }
 }