Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class InteractableObject : MonoBehaviour
- {
- public Item item;
- public virtual void Interact(PlayerMovement playerMovement, bool isRightClick)
- {
- if (item != null)
- {
- if (isRightClick && item.isStorageItem)
- {
- UIManager.Instance.ShowInventoryPrompt(item);
- }
- else
- {
- playerMovement.GetComponent<InteractionSystem>().TryPickUpItem(this);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment