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


C# Gesture类代码示例

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


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

示例1: On_LongTap

 private void On_LongTap(Gesture gesture)
 {
     if (gesture.pickObject == base.gameObject)
     {
         this.textMesh.text = gesture.actionTime.ToString("f2");
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:7,代码来源:LongTap.cs

示例2: OnRelease

 public virtual void OnRelease(Gesture G)
 {
     if (_pressedGID == -1)
         return;
     _pressedGID = -1;
     GestureController.OnGestureEnd -= OnGestureEnd;
 }
开发者ID:ifty420,项目名称:Traffic-Racer-2-3d,代码行数:7,代码来源:GUIClickable.cs

示例3: On_SimpleTap

 // Simple tap
 private void On_SimpleTap( 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));
     }
 }
开发者ID:nickmudry,项目名称:Lost-In-Space,代码行数:8,代码来源:Tap.cs

示例4: On_TouchDown2Fingers

 private void On_TouchDown2Fingers(Gesture gesture)
 {
     if (gesture.pickObject == base.gameObject)
     {
         this.textMesh.text = "Down since :" + gesture.actionTime.ToString("f2");
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:7,代码来源:TwoTouchStart.cs

示例5: On_DragEnd

 // At the drag end
 void On_DragEnd(Gesture gesture)
 {
     if (gesture.pickObject == gameObject){
         this.transform.localRotation = this.transform.localRotation;
         gameObject.GetComponent<Renderer>().material.color = Color.white;
     }
 }
开发者ID:gdgeek,项目名称:fly,代码行数:8,代码来源:Cage.cs

示例6: On_DoubleTap2Fingers

 // Double Tap
 void On_DoubleTap2Fingers( Gesture gesture)
 {
     // Verification that the action on the object
     if (gesture.pickedObject == gameObject){
         gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f),  Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
     }
 }
开发者ID:acorrow,项目名称:ToddlerPop,代码行数:8,代码来源:TwoDoubleTapMe.cs

示例7: On_TouchStart

 private void On_TouchStart(Gesture gesture)
 {
     if (gesture.pickedObject == null) return;
     CurrentPosition = GetTouch(gesture);
     DeltaPosition = CurrentPosition - transform.position;
     OnTouchStart();
 }
开发者ID:Delacrowa,项目名称:project1,代码行数:7,代码来源:ETOnDrag.cs

示例8: On_LongTapEnd2Fingers

	// At the long tap end
	void On_LongTapEnd2Fingers( Gesture gesture){
		// Verification that the action on the object
		if (gesture.pickObject == gameObject){
			gameObject.renderer.material.color = new Color(1f,1f,1f);
			textMesh.text="Long tap";
		}
	}
开发者ID:jjhesk,项目名称:unity-interview,代码行数:8,代码来源:TwoLongTap.cs

示例9: HandleOn_Swipe

    void HandleOn_Swipe(Gesture gesture)
    {
        if( gesture.swipe == EasyTouch.SwipeDirection.Up){
            Fsm.Event(Up);
        }

        if( gesture.swipe == EasyTouch.SwipeDirection.UpLeft){
            Fsm.Event(UpLeft);
        }

        if( gesture.swipe == EasyTouch.SwipeDirection.UpRight){
            Fsm.Event(UpRight);
        }

        if(gesture.swipe == EasyTouch.SwipeDirection.Down){
            Fsm.Event(Down);
        }

        if(gesture.swipe == EasyTouch.SwipeDirection.DownLeft){
            Fsm.Event(DownLeft);
        }

        if(gesture.swipe == EasyTouch.SwipeDirection.DownRight){
            Fsm.Event(DownRight);
        }

        if(gesture.swipe == EasyTouch.SwipeDirection.Left){
            Fsm.Event(Left);
        }

        if(gesture.swipe == EasyTouch.SwipeDirection.Right){
            Fsm.Event(Right);
        }
    }
开发者ID:michaelgenn,项目名称:Dodge-This,代码行数:34,代码来源:EasyTouchSwipe.cs

示例10: PointEventArgs

 public PointEventArgs(Gesture gesture, int x, int y)
     : base()
 {
     this.X = x;
     this.Y = y;
     this.Gesture = gesture;
 }
开发者ID:north0808,项目名称:haina,代码行数:7,代码来源:PointEventArgs.cs

示例11: On_Cancel2Fingers

 private void On_Cancel2Fingers(Gesture gesture)
 {
     if (gesture.touchCount > 0)
     {
         this.newPivot = true;
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:7,代码来源:Photo.cs

示例12: OnGUI

    void OnGUI()
    {
        GUI.Box(drawArea, "Draw Area");

        GUI.Label(new Rect(10, Screen.height - 40, 500, 50), message);

        if (GUI.Button(new Rect(Screen.width - 100, 10, 100, 30), "Recognize")) {

            recognized = true;

            Gesture candidate = new Gesture(points.ToArray());
            string gestureResult = PointCloudRecognizer.Classify(candidate, trainingSet.ToArray());

            message = gestureResult;
            Debug.Log("Message:" + message);
        }

        GUI.Label(new Rect(Screen.width - 200, 150, 70, 30), "Add as: ");
        newGestureName = GUI.TextField(new Rect(Screen.width - 150, 150, 100, 30), newGestureName);

        if (GUI.Button(new Rect(Screen.width - 50, 150, 50, 30), "Add") && points.Count > 0 && newGestureName != "") {

            string fileName = String.Format("{0}/{1}-{2}.xml", Application.persistentDataPath, newGestureName, DateTime.Now.ToFileTime());
            Debug.Log(Application.persistentDataPath);

            #if !UNITY_WEBPLAYER
                DataGestures.Save(points, strokeId+1, fileName, newGestureName );
            #endif

            trainingSet.Add(new Gesture(points.ToArray(), newGestureName));

            newGestureName = "";
        }
    }
开发者ID:kreeds,项目名称:TestProjectDemo,代码行数:34,代码来源:Demo.cs

示例13: On_LongTapStart

	// At the long tap beginning 
	private void On_LongTapStart( Gesture gesture){
		
		// Verification that the action on the object
		if (gesture.pickObject==gameObject){
			gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f),  Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
		}
	}
开发者ID:ChadCSong,项目名称:Unity3DCarGameSample,代码行数:8,代码来源:LongTap.cs

示例14: On_SimpleTap

	private void On_SimpleTap(Gesture gesture)
	{
		if (gesture.pickedObject != null)
		{
			if (spawnerDisplayEnabled)
				HideSpawnerOptions();

			if (turretSelectDisplayEnabled)
				HideTurretSelectTab();

			if (gesture.pickedObject.tag == "SpawnPosition")
			{
				AllySpawnerPosition allySpawnerPosition = gesture.pickedObject.GetComponent<AllySpawnerPosition>();
				ShowSpawnerOptions(allySpawnerPosition);
			}
			if (gesture.pickedObject.tag == "Ally")
			{
				structureController = gesture.pickedObject.GetComponent<AllyStructureController>();

				if (structureController.IsTurret)
				{
					destroyTurretTab.StructureController = gesture.pickedObject.GetComponentInChildren<AllyStructureController>();
					turretSelectWidget.SetAnchor(gesture.pickedObject.transform);
					ShowTurretSelectTab();
				}
			}
		}
	}
开发者ID:elcastcze,项目名称:TowerDefense,代码行数:28,代码来源:AllySpawnerController.cs

示例15: On_TouchDown

 // During the touch is down
 private void On_TouchDown(Gesture gesture)
 {
     // Verification that the action on the object
     if (gesture.pickedObject == gameObject){
         textMesh.text = "Down since :" + gesture.actionTime.ToString("f2");
     }
 }
开发者ID:acorrow,项目名称:ToddlerPop,代码行数:8,代码来源:TouchMe.cs


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