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


C# Controller.EnableGesture方法代码示例

本文整理汇总了C#中Controller.EnableGesture方法的典型用法代码示例。如果您正苦于以下问题:C# Controller.EnableGesture方法的具体用法?C# Controller.EnableGesture怎么用?C# Controller.EnableGesture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Controller的用法示例。


在下文中一共展示了Controller.EnableGesture方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

	// Use this for initialization
	
    void Start () {
        controller = new Controller();
        controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
        controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
        controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
        controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
	}
开发者ID:Nindustrialist,项目名称:VRBreadboarding,代码行数:9,代码来源:SimpleGestureRecognize.cs

示例2: Start

    void Start()
    {
        controller = new Controller ();

        controller.EnableGesture (Gesture.GestureType.TYPE_SWIPE);
        controller.EnableGesture (Gesture.GestureType.TYPE_CIRCLE);
        controller.EnableGesture (Gesture.GestureType.TYPE_SCREEN_TAP);
        //for swipe
        controller.Config.SetFloat ("Gesture.Swipe.MinLength", 200.0f);
        controller.Config.SetFloat ("Gesture.Swipe.MinVelocity", 750f);
        //for circle
        controller.Config.SetFloat ("Gesture.Circle.MinRadius", 80.0f);
        controller.Config.SetFloat ("Gesture.Circle.MinArc", 1.8f);
        //for screen tap
        controller.Config.SetFloat ("Gesture.ScreenTap.MinForwardVelocity", 1.0f);
        controller.Config.SetFloat ("Gesture.ScreenTap.HistorySeconds", .05f);
        controller.Config.SetFloat ("Gesture.ScreenTap.MinDistance", 1.0f);

        controller.Config.Save ();
        timeLimit = 5.0f;
        timer = 0.0f;

        p = GameObject.Find ("ps").GetComponent<ParticleSystem> ();
        before = GameObject.Find ("before").GetComponent<SpriteRenderer> ();
        after = GameObject.Find ("after").GetComponent<SpriteRenderer> ();

        after.color = new Color (255, 255, 255, 0);
        p.Pause ();
    }
开发者ID:Sunghyo,项目名称:fashionstory,代码行数:29,代码来源:Sh.cs

示例3: 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

示例4: OnConnect

 public override void OnConnect(Controller controller)
 {
     SafeWriteLine("Connected");
     controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
     controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
 }
开发者ID:GMDIT,项目名称:LeapChess,代码行数:8,代码来源:LMS.cs

示例5: Start

	private void Start(){
		controller = new Controller ();
		controller.EnableGesture (Gesture.GestureType.TYPECIRCLE);
		controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP);

		lastClientScale = transform.localScale;
		serverCurrentScale = lastClientScale;

	}
开发者ID:mlakhal,项目名称:CollaborativeAugmentedRealityEnvironment,代码行数:9,代码来源:Circle_scripts.cs

示例6: Start

 // Use this for initialization
 void Start()
 {
     state = RotationState.stay;
     controller = new Controller();
     controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
     controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
     controller.Config.SetFloat("Gesture.Swipe.MinVelocity", 750f);
     controller.Config.Save();
     cooldown = 0;
 }
开发者ID:blchu,项目名称:INvironment,代码行数:11,代码来源:KeyInteraction.cs

示例7: Start

	void Start ()
	{
		leftHandPrev = new Leap.Vector (0, 0, 0);
		rightHandPrev = new Leap.Vector (0, 0, 0);
		leftDirPrev = new Leap.Vector (0, 0, 0);
		rightDirPrev = new Leap.Vector (0, 0, 0);
		leftHand = new Hand ();
		rightHand = new Hand ();
		controller = new Controller();
		panEnabled = true;
		controller.EnableGesture (Gesture.GestureType.TYPECIRCLE);
		controller.EnableGesture (Gesture.GestureType.TYPESWIPE);
		controller.EnableGesture (Gesture.GestureType.TYPEKEYTAP);
		controller.EnableGesture (Gesture.GestureType.TYPESCREENTAP);
	}
开发者ID:tjh913,项目名称:unityleapmodeling,代码行数:15,代码来源:TrackingScript.cs

示例8: Start

    // Use this for initialization
    void Start()
    {
        player = GameObject.Find ("Player");

        controller = new Controller();
        controller.EnableGesture (Gesture.GestureType.TYPE_CIRCLE);
        controller.EnableGesture (Gesture.GestureType.TYPE_KEY_TAP);
        controller.EnableGesture (Gesture.GestureType.TYPE_SCREEN_TAP);
        controller.EnableGesture (Gesture.GestureType.TYPE_SWIPE);
        controller.EnableGesture (Gesture.GestureType.TYPE_INVALID);
        controller.Config.SetFloat ("Gesture.Swipe.MinLength", 200.0f);
        controller.Config.SetFloat ("Gesture.Swipe.MinVelocity", 750f);

        controller.Config.Save();
    }
开发者ID:kgobes,项目名称:HackRU,代码行数:16,代码来源:Shoot.cs

示例9: Start

    //public GameObject pointingLGo;

    void Start ()
    {
        controller = new Controller();
        // Set circle gesture
        controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
        controller.Config.SetFloat("Gesture.Circle.MinRadius", circleGestureTreshold);
        //controller.Config.SetFloat("Gesture.Circle.MinVelocity", 500f);

        // Set ScreenTap gesture
        controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
        controller.Config.SetFloat("Gesture.ScreenTap.MinForwardVelocity", screenTapGestureTreshold);
        controller.Config.SetFloat("Gesture.ScreenTap.HistorySeconds", .5f);
        controller.Config.SetFloat("Gesture.ScreenTap.MinDistance", 1.0f);
        controller.Config.Save();
    }
开发者ID:Belazos,项目名称:JamiRepo2016,代码行数:17,代码来源:HandGestures.cs

示例10: ActiveCircleGestture

	private void ActiveCircleGestture(Controller controller)
	{
		controller.EnableGesture (Gesture.GestureType.TYPE_CIRCLE);
		controller.Config.SetFloat ("Gesture.Circle.MinRadius", circleMinRadius);
		controller.Config.SetFloat ("Gesture.Circle.MinArc", circleMinArc);
		controller.Config.Save ();
	}
开发者ID:pangaeastudio,项目名称:vrgame-bruceli,代码行数:7,代码来源:LeapmotionGestureFine.cs

示例11: ActiveSwipeGesture

	private void ActiveSwipeGesture(Controller controller)
	{
		controller.EnableGesture (Gesture.GestureType.TYPE_SWIPE);
		controller.Config.SetFloat ("Gesture.Swipe.MinLength", swipeMinLength);
		controller.Config.SetFloat ("Gesture.Swipe.MinVelocity", swipeMinVelocity);
		controller.Config.Save ();
	}
开发者ID:pangaeastudio,项目名称:vrgame-bruceli,代码行数:7,代码来源:LeapmotionGestureFine.cs

示例12: Start

    // Use this for initialization
    void Start () {
        cube = GameObject.Find("Cube");
        box = GameObject.Find("Box");
        objects = GameObject.Find("Objects");
        sphere = GameObject.Find("Sphere");
        handController = GameObject.Find("HandController");
        controller = new Controller();
        controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
        controller.Config.SetFloat("Gesture.KeyTap.MinDownVelocity", 20.0f);
        controller.Config.SetFloat("Gesture.KeyTap.HistorySeconds", 0.2f);
        controller.Config.SetFloat("Gesture.KeyTap.MinDistance", 1.6f);

        /*
        for (int i = 0; i < 4; i++)
        {
            for (int j = 0; j < 4; j++)
            {
                for (int k = 0; k <4; k++)
                {
                    SpawnObject(1, (i + 1) * 0.6f - 1.5f, (j + 1) * 0.6f - 1.5f, (k + 1) * 0.6f - 1.5f);
                }
            }
        }
        */

    }
开发者ID:philipqlu,项目名称:SpaceTTT,代码行数:27,代码来源:Main.cs

示例13: Start

 // Use this for initialization
 void Start()
 {
     controller = new Controller();
     controller.EnableGesture(Leap.Gesture.GestureType.TYPE_SWIPE);
     controller.Config.SetFloat("Gesture.Swipe.MinLength", 200.0f);
     controller.Config.SetFloat("Gesture.Swipe.MinVelocity", 750f);
     controller.Config.Save();
 }
开发者ID:k3nnywilliam,项目名称:Leap-Motion-and-Unity,代码行数:9,代码来源:GestureScript.cs

示例14: LeapMotionGestureControl

    public LeapMotionGestureControl()
    {
        // Set up listener and controller
        listener = new LeapMotionGestureControlListener();
        controller = new Controller();

        // Allow background frames, otherwise.. well, it's useless
        controller.SetPolicy(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES);

        // Watch for circles
        controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
        controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
        controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);

        // Add on the listener
        controller.AddListener(listener);
    }
开发者ID:govindraj513,项目名称:leap-motion-gesture-control,代码行数:17,代码来源:LeapMotionGestureControl.cs

示例15: Start

 void Start()
 {
     controller = new Controller();
     controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
     controller.Config.SetFloat("Gesture.Swipe.MinLength", minimumSwipeLength);
     controller.Config.SetFloat("Gesture.Swipe.MinVelocity", minimumSwipeVelocity);
     controller.Config.Save();
 }
开发者ID:dannisliang,项目名称:unity_interactive_playground,代码行数:8,代码来源:Swipe_Spin.cs


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