Advertisement
evelynshilosky

InteractableObject - Part 1

Jan 21st, 2025
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.32 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class InteractableObject : MonoBehaviour
  6. {
  7.     public Item item;
  8.  
  9.     public void Interact(PlayerMovement playerMovement)
  10.     {
  11.         if (item != null)
  12.         {
  13.             playerMovement.PickUpItem(this);
  14.         }
  15.     }
  16.  
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement