Added interaction, hand, rigidbody dragging, picking up hammer

This commit is contained in:
nothke
2024-08-18 13:21:38 +02:00
parent 93ecc95bfa
commit d2c3dff101
76 changed files with 5079 additions and 4 deletions

View 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() { }
}
}