mirror of
https://github.com/nothke/quality-control.git
synced 2025-08-31 07:43:42 +00:00
Added interaction, hand, rigidbody dragging, picking up hammer
This commit is contained in:
37
Assets/Plugins/Interaction/Runtime/Core/Interactable.cs
Normal file
37
Assets/Plugins/Interaction/Runtime/Core/Interactable.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
namespace Nothke.Interaction
|
||||
{
|
||||
public class Interactable : MonoBehaviour
|
||||
{
|
||||
[HideInInspector]
|
||||
public InteractionController manager;
|
||||
|
||||
[System.Serializable]
|
||||
public class Info
|
||||
{
|
||||
public string name;
|
||||
|
||||
//public string descriptionShort;
|
||||
//[Multiline()]
|
||||
//public string description;
|
||||
}
|
||||
|
||||
public Info info;
|
||||
public virtual string Label => info.name;
|
||||
|
||||
public virtual void Use(InteractionController im)
|
||||
{
|
||||
manager = im;
|
||||
//Debug.Log("No use");
|
||||
}
|
||||
|
||||
public virtual void OnHover() { }
|
||||
public virtual void OnDehover() { }
|
||||
|
||||
public virtual void StartHold() { }
|
||||
public virtual void EndHold() { }
|
||||
public virtual void UseHold() { }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user