本文整理汇总了C#中Controller.IsGestureEnabled方法的典型用法代码示例。如果您正苦于以下问题:C# Controller.IsGestureEnabled方法的具体用法?C# Controller.IsGestureEnabled怎么用?C# Controller.IsGestureEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller.IsGestureEnabled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
Debug.Log("Start");
controller = new Controller();
if (!controller.IsGestureEnabled(Gesture.GestureType.TYPE_SWIPE))
{
Debug.Log("Enabled swipe");
// controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
}
if (!controller.IsGestureEnabled(Gesture.GestureType.TYPE_SCREEN_TAP))
{
Debug.Log("Enabled screen tap");
controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
}
if (!controller.IsGestureEnabled(Gesture.GestureType.TYPE_KEY_TAP))
{
Debug.Log("Enabled key tap");
controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
}
button = GameObject.Find("Button");
//button = FindObjectOfType();
buttonPos = button.transform.position.normalized;
Debug.Log(System.String.Format("Button pos: {0}", buttonPos.ToString()));
// buttonPos = new Vector(position.x, position.y, position.z);
}
示例2: Start
// Use this for initialization
void Start()
{
leapController = new Controller();
leapListener = new Listener();
// Log that the Leap Motion device is attached and recognized
foreach(Device item in leapController.Devices)
{
Debug.Log("Leap Motion Device ID:" + item.ToString());
}
// Add a listener so that the controller is waiting for inputs
leapController.AddListener(leapListener);
// Check that the leap is fully connected and ready for input
Debug.Log("Leap Motion connected: " + leapController.IsConnected);
// Set up the gesture detection
leapController.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
leapController.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
Debug.Log("Circle Gesture Enabled: " + leapController.IsGestureEnabled(Gesture.GestureType.TYPE_CIRCLE));
Debug.Log("Screen Tap Gesture Enabled: " + leapController.IsGestureEnabled(Gesture.GestureType.TYPESCREENTAP));
}
示例3: Start
Vector startPoint; // 시작 좌표
#endregion Fields
#region Methods
// Use this for initialization
void Start()
{
Debug.Log ("Start Test");
controller = new Controller ();
// 제스처 사용 정의 ..
if ( !controller.IsGestureEnabled( Gesture.GestureType.TYPE_SWIPE )) {
controller.EnableGesture (Gesture.GestureType.TYPE_SWIPE);
}
isPlaying = false;
// 제스처 옵션 설정..
controller.Config.SetFloat ("Gesture.Swipe.MinVelocity", 180.0f);
controller.Config.SetFloat ("Gesture.Swipe.MinLength", 80.0f);
controller.Config.Save ();
}