Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.03 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class MainScene : MonoBehaviour {
  5.    
  6.     public bool circle = false;
  7.     public bool keytap = false;
  8.     public bool twofingerkeytap = false;
  9.     public bool threefingerkeytap = false;
  10.     public bool screentap = false;
  11.     public bool twofingerscreentap = false;
  12.     public bool threefingerscreentap = false;
  13.     public bool swipe = false;
  14.     public bool numbers = false;
  15.     public bool closefist = false;
  16.     public bool openfist = false;
  17.     public bool push = false;
  18.     public bool pull = false;
  19.     public bool doubleinwardswipe = false;
  20.     public bool doubleoutwardswipe = false;
  21.     public bool clap = false;
  22.     public bool steeringwheel = false;
  23.     //public GameObject timer;
  24.     public GameObject Text;
  25.    
  26.     // Use this for initialization
  27.     void Start () {
  28.         ELGManager.GestureRecognised += onGestureRecognised;
  29.         ELGManager.circleGestureRegistered = circle;
  30.         ELGManager.keytapGestureRegistered = keytap;
  31.         ELGManager.screentapGestureRegistered = screentap;
  32.         ELGManager.swipeGestureRegistered = swipe;
  33.         ELGManager.numbersGestureRegistered = numbers;
  34.         ELGManager.closeFistRegistered = closefist;
  35.         ELGManager.openFistRegistered = openfist;
  36.         ELGManager.pushGestureRegistered = push;
  37.         ELGManager.pullGestureRegistered = pull;
  38.         ELGManager.doubleInwardsSwipeGestureRegistered = doubleinwardswipe;
  39.         ELGManager.doubleOutwardsSwipeGestureRegistered = doubleoutwardswipe;
  40.         ELGManager.clapGestureRegistered = clap;
  41.         ELGManager.twoFingerKeytapRegistered = twofingerkeytap;
  42.         ELGManager.threeFingerKeytapRegistered = threefingerkeytap;
  43.         ELGManager.twoFingerScreentapRegistered = twofingerscreentap;
  44.         ELGManager.threeFingerScreentapRegistered = threefingerscreentap;
  45.         ELGManager.steeringWheelRegistered = steeringwheel;
  46.     }
  47.    
  48.     void OnDestroy() {
  49.         ELGManager.GestureRecognised -= onGestureRecognised;
  50.     }
  51.    
  52.     void onGestureRecognised(EasyLeapGesture gesture) {
  53.         //timer.SetActive(true);
  54.         Text.GetComponent<screenShot2>().p3();
  55.         //print ("Gesture! " + gesture.Type + " " + gesture.Id + " " + gesture.State +" " + gesture.Duration + " " + gesture.Position);
  56.     }
  57.    
  58.     void Update() {
  59.         ELGManager.circleGestureRegistered = circle;
  60.         ELGManager.keytapGestureRegistered = keytap;
  61.         ELGManager.screentapGestureRegistered = screentap;
  62.         ELGManager.swipeGestureRegistered = swipe;
  63.         ELGManager.numbersGestureRegistered = numbers;
  64.         ELGManager.closeFistRegistered = closefist;
  65.         ELGManager.openFistRegistered = openfist;
  66.         ELGManager.pushGestureRegistered = push;
  67.         ELGManager.pullGestureRegistered = pull;
  68.         ELGManager.doubleInwardsSwipeGestureRegistered = doubleinwardswipe;
  69.         ELGManager.doubleOutwardsSwipeGestureRegistered = doubleoutwardswipe;
  70.         ELGManager.clapGestureRegistered = clap;
  71.         ELGManager.twoFingerKeytapRegistered = twofingerkeytap;
  72.         ELGManager.threeFingerKeytapRegistered = threefingerkeytap;
  73.         ELGManager.twoFingerScreentapRegistered = twofingerscreentap;
  74.         ELGManager.threeFingerScreentapRegistered = threefingerscreentap;
  75.         ELGManager.steeringWheelRegistered = steeringwheel;
  76.     }
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement