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