void PickupInput()
{
if (canInteract)
{
if (Input.GetKeyDown(CPInputManager.instance.interactKey))
{
collectableItem.ItemAction();
}
}
}
private void Update()
{
if (disableInventoryOpen)
return;
if (Input.GetKeyDown(CPInputManager.instance.openInventoryKey))
{
isOpen = !isOpen;
ToggleInventory(isOpen);
}
else if (isOpen && Input.GetKeyDown(CPInputManager.instance.closeInventoryKey))
{
isOpen = false;
ToggleInventory(isOpen);
}
}