• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gesture类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: On_PinchIn

 void On_PinchIn(Gesture gesture)
 {
     EasyTouch.On_Swipe -= On_Swipe;
     if (camera.orthographicSize < zoom_max) {
         camera.orthographicSize += zoom_speed;
     }
 }
开发者ID:schabou,项目名称:MobileRTS,代码行数:7,代码来源:Camera_Movement.cs


示例17: onTouchStart

 public void onTouchStart(Gesture gesture)
 {
     _ctrl.doControl ();
     _touchPosition = _play.touch (gesture.position);// + _ctrl._dirver.fly.gameObject.transform.position;
     //_touchTime = 0;
     //isDown_ = true;
 }
开发者ID:gdgeek,项目名称:fly,代码行数:7,代码来源:PlayInput.cs


示例18: On_PinchOut

 void On_PinchOut(Gesture gesture)
 {
     EasyTouch.On_Swipe -= On_Swipe;
     if(camera.orthographicSize > zoom_min){
         camera.orthographicSize -= zoom_speed;
     }
 }
开发者ID:schabou,项目名称:MobileRTS,代码行数:7,代码来源:Camera_Movement.cs


示例19: On_Drag

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


示例20: On_SimpleTap

	// Simple Touch message
	void On_SimpleTap(Gesture gesture){
	
		if (gesture.pickObject == gameObject){
			GameObject child=null;
			
			rigidbody.constraints  = RigidbodyConstraints.None;
			
			foreach (Transform childreen in transform ){
				if (childreen.name=="ring")
					child = childreen.gameObject;
			}
			
			if (child==null){
		
				GameObject ring = Instantiate(Resources.Load("Ring01"), transform.position , Quaternion.identity) as GameObject;
				ring.transform.localScale = transform.localScale * 1.5f;
				ring.AddComponent("SlowRotate");
				ring.renderer.material.SetColor ("_TintColor", renderer.material.GetColor("_TintColor"));
				
				ring.transform.parent = transform;
				ring.name="ring";
			
			}
			else{
				Destroy( child);
			}
		
		}
		
	}
开发者ID:reaganq,项目名称:MagnetBots_unity,代码行数:31,代码来源:ObjectTouch.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GestureData类代码示例发布时间:2022-05-24
下一篇:
C# Geoprocessor类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap