JoshButner

Henchman - Grabbable.cs

Mar 10th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Sirenix.OdinInspector;
  5.  
  6.  
  7. // This class is currently essentially an abstract class, however abstract classes don't work properly with OdinInspector properties
  8. public class Grabbable : MonoBehaviour
  9. {
  10.     public GrabPriority priorityLevel = GrabPriority.Decoration;
  11.     [Tooltip("The grabbable will be treated as if this position is its center.")]
  12.     [Required, SceneObjectsOnly]
  13.     public Transform location;
  14.  
  15.     [HideInInspector]
  16.     public Grabber grabbedBy = null;
  17.  
  18.     public virtual void Grabbed(Grabber grabber){
  19.  
  20.     }
  21.  
  22.     public virtual void Ungrabbed(Grabber grabber){
  23.  
  24.     }
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment