public void TakeItem (Item item) { if (!item.canPickup) return; if (Vector3.Distance (item.transform.position, transform.position) < findSphereRadius) { item.gameObject.SetActive (false); item.transform.parent = transform; item.transform.localPosition = Vector3.zero; items.Add (item); // --- events item.OnItemPickUp (behavior.gameObject); EventItemTake (item.gameObject); } }