当前位置: 首页>>代码示例>>C#>>正文


C# Controller.IsGestureEnabled方法代码示例

本文整理汇总了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);
    }
开发者ID:ehliang,项目名称:LeapStacks,代码行数:28,代码来源:Makeitrain.cs

示例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));
    }
开发者ID:misslivirose,项目名称:leap_vr_tests,代码行数:22,代码来源:ShooterScript.cs

示例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 ();
    }
开发者ID:flashwade03,项目名称:LeapMotionVRInterface,代码行数:25,代码来源:SwitcherTest.cs


注:本文中的Controller.IsGestureEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。