public void OnExitPickup(PickUpBehaviour pickUpBehaviour) { bool hasItem = _item != null; if (hasItem) { _ui.ChangeState(ItemSlotUiController.State.Drop); } else { _ui.ChangeState(ItemSlotUiController.State.Disabled); } _pickUp = null; }
public void OnEnterPickup(PickUpBehaviour pickUpBehaviour) { if (!pickUpBehaviour.PickUpNeedApproval) { pickUpBehaviour.PickUp(_inventory); return; } bool hasItem = _item != null; if (hasItem) { _ui.ChangeState(ItemSlotUiController.State.Swap); } else { _ui.ChangeState(ItemSlotUiController.State.PickUp); } _pickUp = pickUpBehaviour; }