using System; using System.Diagnostics; using UnityEngine; namespace Leap.Unity { public abstract class LeapProvider : MonoBehaviour { [DebuggerBrowsable(DebuggerBrowsableState.Never)] public event Action OnUpdateFrame; [DebuggerBrowsable(DebuggerBrowsableState.Never)] public event Action OnFixedFrame; public abstract Frame CurrentFrame { get; } public abstract Frame CurrentFixedFrame { get; } public abstract Image CurrentImage { get; } protected void DispatchUpdateFrameEvent(Frame frame) { if (this.OnUpdateFrame != null) { this.OnUpdateFrame(frame); } } protected void DispatchFixedFrameEvent(Frame frame) { if (this.OnFixedFrame != null) { this.OnFixedFrame(frame); } } } }