BGJ-2022.1/Assets/Scripts/Interactable/UnityEventInteractable.cs

15 lines
483 B
C#

using UnityEngine;
using UnityEngine.Events;
namespace Interactable
{
public class UnityEventInteractable : InteractableBase
{
[SerializeField] protected UnityEvent onInteractEvent = new UnityEvent();
[SerializeField] protected UnityEvent onResetInteractionEvent = new UnityEvent();
protected override void OnInteract() => onInteractEvent?.Invoke();
protected override void OnResetInteraction() => onResetInteractionEvent?.Invoke();
}
}