//Pickup the item you are touching private void PickupItem() { if (itemTouching != null) { if (Input.GetKeyDown(KeyCode.Z)) { ItemID item = itemTouching.GetComponent <ItemID>(); item.Pickup(); //Removes the physical item from the scene EventParam itemParams = new EventParam(); itemParams.paramItemID = item.itemID; itemParams.paramInt = 1; EventManager.TriggerEvent("ITEM_PICKUP", itemParams); } } }