public override void PutItemIn(ItemBase iInputItem, CharacterItemController iCharacterItemController) { if (iInputItem.whatItemAmI == requestedItem && !pIsCoroutineRunning) { StartTimeTillhandout(); iCharacterItemController.RemoveItem(); Destroy(iInputItem.gameObject); } else { iCharacterItemController.DropItem(); } }
public override void Interact(CharacterItemController iItemController) { base.Interact(iItemController); if (iItemController.amIHoldingAnItem && _handoutReadyIcon.activeSelf) { iItemController.DropItem(); } else if (!iItemController.amIHoldingAnItem && _handoutReadyIcon.activeSelf) { GameObject tObjectToHAndout = CollectHandout(); tObjectToHAndout.GetComponentInChildren <Rigidbody>().constraints = RigidbodyConstraints.FreezeAll; ItemBase tItembase = tObjectToHAndout.GetComponentInChildren <ItemBase>(); iItemController.PickItemUp(tItembase); } else if (iItemController.amIHoldingAnItem && !_handoutReadyIcon.activeSelf && !pIsCoroutineRunning) { PutItemIn(iItemController.itemIAmHolding, iItemController); } else { iItemController.DropItem(); } }