using UnityEngine; namespace Moonlit.FootstepPro { [SerializeField] [RequireComponent(typeof(Foot))] public abstract class IStepDetector : MonoBehaviour { public enum CombineType { Required = 0, Optional = 1 } [SerializeField] protected CombineType _Type; public CombineType Type { get { return _Type; } } public abstract bool Detect(Foot foot); public abstract void Callback(bool footPlaced); public void OnEnable() { Foot component = GetComponent(); if (!component.Detectors.Contains(this)) { component.Detectors.Add(this); } } public void OnDisable() { Foot component = GetComponent(); if (component.Detectors.Contains(this)) { component.Detectors.Remove(this); } } } }