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


C# Gesture.GetTouchToWordlPoint方法代码示例

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


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

示例1: On_Swipe2Fingers

	// during the swipe
	void  On_Swipe2Fingers(Gesture gesture){
		
		if (trail!=null){
			Vector3 position = gesture.GetTouchToWordlPoint(5);
			trail.transform.position = position;
		}
	}
开发者ID:ChadCSong,项目名称:Unity3DCarGameSample,代码行数:8,代码来源:TwoSwipe.cs

示例2: On_SwipeStart

 private void On_SwipeStart(Gesture gesture)
 {
     if ((gesture.fingerIndex == 0) && (this.trail == null))
     {
         Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
         this.trail = UnityEngine.Object.Instantiate(Resources.Load("Trail"), touchToWordlPoint, Quaternion.identity) as GameObject;
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:8,代码来源:Swipe.cs

示例3: On_Swipe

 private void On_Swipe(Gesture gesture)
 {
     if (this.trail != null)
     {
         Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
         this.trail.transform.position = touchToWordlPoint;
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:8,代码来源:Swipe.cs

示例4: On_Drag

    // Drag Message => move
    void On_Drag(Gesture gesture)
    {
        if (gesture.pickObject == gameObject){
            Vector3 position = gesture.GetTouchToWordlPoint(8);

            GetComponent<Rigidbody>().position = position - deltaPosition;
        }
    }
开发者ID:gdgeek,项目名称:fly,代码行数:9,代码来源:ObjectTouch.cs

示例5: On_DragStart

 private void On_DragStart(Gesture gesture)
 {
     if (gesture.touchCount == 1)
     {
         Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(1f, false);
         this.deltaPosition = touchToWordlPoint - base.transform.position;
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:8,代码来源:Photo.cs

示例6: On_Drag

 private void On_Drag(Gesture gesture)
 {
     if (gesture.pickObject == base.gameObject)
     {
         Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(8f, false);
         base.rigidbody.position = touchToWordlPoint - this.deltaPosition;
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:8,代码来源:ObjectTouch.cs

示例7: On_DragStart

    // Drag_Start
    void On_DragStart(Gesture gesture)
    {
        if (gesture.pickObject == gameObject){
            Vector3 position = gesture.GetTouchToWordlPoint(8);
            deltaPosition = position - GetComponent<Rigidbody>().position;

            GetComponent<Rigidbody>().constraints  = RigidbodyConstraints.None;
        }
    }
开发者ID:gdgeek,项目名称:fly,代码行数:10,代码来源:ObjectTouch.cs

示例8: On_DragStart

 private void On_DragStart(Gesture gesture)
 {
     if (gesture.pickObject == base.gameObject)
     {
         base.gameObject.renderer.material.color = new Color(UnityEngine.Random.Range((float) 0f, (float) 1f), UnityEngine.Random.Range((float) 0f, (float) 1f), UnityEngine.Random.Range((float) 0f, (float) 1f));
         Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
         this.deltaPosition = touchToWordlPoint - base.transform.position;
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:9,代码来源:Drag.cs

示例9: On_DragStart

 private void On_DragStart(Gesture gesture)
 {
     if (gesture.pickObject == base.gameObject)
     {
         Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(8f, false);
         this.deltaPosition = touchToWordlPoint - base.rigidbody.position;
         base.rigidbody.constraints = RigidbodyConstraints.None;
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:9,代码来源:ObjectTouch.cs

示例10: On_Swipe

	// During the swipe
	private void On_Swipe(Gesture gesture){
		
		if (trail!=null){
			
			// the world coordinate from touch for z=5
			Vector3 position = gesture.GetTouchToWordlPoint(5);
			trail.transform.position = position;
		}
	}
开发者ID:kinkeika,项目名称:Sample001,代码行数:10,代码来源:Swipe.cs

示例11: On_DragStart

	// One finger drag
	void On_DragStart( Gesture gesture){
	
	 	// restricted when there is only one touch 
		if (gesture.touchCount==1){
			// Calculate the delta position between touch and photo center position
			Vector3 position = gesture.GetTouchToWordlPoint(1);
			deltaPosition = position - transform.position;
		}
	}
开发者ID:ChadCSong,项目名称:Unity3DCarGameSample,代码行数:10,代码来源:Photo.cs

示例12: On_Drag

 private void On_Drag(Gesture gesture)
 {
     if (gesture.pickObject == base.gameObject)
     {
         Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
         base.transform.position = touchToWordlPoint - this.deltaPosition;
         this.textMesh.text = gesture.swipe.ToString() + " / angle :" + gesture.GetSwipeOrDragAngle().ToString("f2");
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:9,代码来源:Drag.cs

示例13: On_SwipeStart2Fingers

 private void On_SwipeStart2Fingers(Gesture gesture)
 {
     if (this.trail == null)
     {
         Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
         this.trail = UnityEngine.Object.Instantiate(Resources.Load("Trail"), touchToWordlPoint, Quaternion.identity) as GameObject;
         EasyTouch.SetEnableTwist(false);
         EasyTouch.SetEnablePinch(false);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:10,代码来源:TwoSwipe.cs

示例14: On_SwipeStart

	// At the swipe beginning 
	private void On_SwipeStart( Gesture gesture){
		
		// Only for the first finger
		if (gesture.fingerIndex==0 && trail==null){ 
			
			// the world coordinate from touch for z=5
			Vector3 position = gesture.GetTouchToWordlPoint(5);
			trail = Instantiate( Resources.Load("Trail"),position,Quaternion.identity) as GameObject;
		}
	}
开发者ID:kinkeika,项目名称:Sample001,代码行数:11,代码来源:Swipe.cs

示例15: On_DragStart2Fingers

	// At the drag beginning
	void On_DragStart2Fingers(Gesture gesture){

		// Verification that the action on the object
		if (gesture.pickObject == gameObject){	
			gameObject.renderer.material.color = new Color( Random.Range(0.0f,1.0f),  Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
		
			Vector3 position =  gesture.GetTouchToWordlPoint(  5);
			deltaPosition = position - transform.position;
		}
	}
开发者ID:jjhesk,项目名称:unity-interview,代码行数:11,代码来源:TwoDrag.cs


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