using System;
using UnityEngine;
namespace Leap.Unity
{
public abstract class LeapProvider : MonoBehaviour
{
public event Action OnUpdateFrame;
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);
}
}
}
}