예제 #1
0
    private void Interact()
    {
        if (CurrentInteractable is InventoryItem)
        {
            InventoryItems.AddToInventory(CurrentInteractable as InventoryItem);
        }

        //Remove item from inventory
        if (InventoryItems.HasRequirements(CurrentInteractable))
        {
            // Interact with current detected interactable
            CurrentInteractable.Interact();
            OnInteracted(CurrentInteractable);
            RemoveItemFromInventory();
        }
    }