Loading files
using Leap.Unity.Attributes;
using UnityEngine;
using UnityEngine.Events;
namespace Leap.Unity.Gestures {
public class GestureUnityEvent : MonoBehaviour {
[ImplementsInterface(typeof(IGesture))]
public MonoBehaviour _gesture;
public IGesture gesture {
get { return _gesture as IGesture; }
set { _gesture = value as MonoBehaviour; }
}
public UnityEvent OnGestureFinished;
void Update() {
if (gesture.wasFinished) {
OnGestureFinished.Invoke();
}
}
}
}
f6b8e5137This file is pinned to the selected release. Download the original to open it in your design tool.