Exemplo n.º 1
0
 public override bool OnTouchEvent(MotionEvent e)
 {
     GestureDetect.OnTouchEvent(e);
     ScaleGestureDetect.OnTouchEvent(e);
     RotationGestureDetect.onTouchEvent(e);
     return(base.OnTouchEvent(e));
 }
Exemplo n.º 2
0
 public HandsRecognition(MainForm form)
 {
     m_images            = new Queue <PXCMImage>();
     this.form           = form;
     LUT                 = Enumerable.Repeat((byte)0, 256).ToArray();
     LUT[255]            = 1;
     NextPageGesture     = new GestureDetect();
     PreviousPageGesture = new GestureDetect();
     FirstPageGesture    = new GestureDetect();
     EndPageGesture      = new GestureDetect();
 }
Exemplo n.º 3
0
    void Start()
    {
        grouded = false;

        hasChangedPosition = false;

        target = 0;
        // get the gestures listener
        gestureListener = GestureDetect.Instance;

        animator.SetFloat("MoveSpeed", 1.5f);
    }
        public HandsRecognition(MainForm form)
        {
            m_images  = new Queue <PXCMImage>();
            this.form = form;
            LUT       = Enumerable.Repeat((byte)0, 256).ToArray();
            LUT[255]  = 1;
            Gesture_J = new GestureDetect();
            Gesture_K = new GestureDetect();
            Gesture_L = new GestureDetect();
            Gesture_U = new GestureDetect();

            Gesture_W = new GestureDetect();
            Gesture_S = new GestureDetect();
            Gesture_D = new GestureDetect();
            Gesture_A = new GestureDetect();
        }
Exemplo n.º 5
0
    void Start()
    {
        gestureDetect = GestureDetect.Instance;
        gestureDetect.OnVariableChange += change;
        cards          = new GameObject[CARD_NUM];
        CardsPosition  = new Vector3[CARD_NUM];
        CardsRotation  = new Quaternion[CARD_NUM];
        positions      = new Vector3[56];
        fulu_positions = new Vector3[56];
        rotations      = new Vector3[56];
        fulu_rotations = new Vector3[56];
        pushedCardPos  = new Vector3[120];
        lizhi_state    = new bool[4];
        score_list     = new int[4];
        rank_list      = new int[4];
        for (int i = 0; i < 14; i++)
        {
            positions[i]      = new Vector3(0.7f, 0.034f, -0.35f + i * 0.05f);
            rotations[i]      = new Vector3(-90f, 0f, -90f);
            positions[i + 28] = new Vector3(-0.7f, 0.034f, 0.35f - i * 0.05f);
            rotations[i + 28] = new Vector3(-90f, 0f, 90f);
            positions[i + 14] = new Vector3(0.35f - i * 0.05f, 0.034f, 0.7f);
            rotations[i + 14] = new Vector3(90f, 0f, 0f);
            positions[i + 42] = new Vector3(-0.35f + i * 0.05f, 0.034f, -0.7f);
            rotations[i + 42] = new Vector3(-90f, 0f, 0f);

            fulu_positions[i]      = new Vector3(0.95f, 0.04f, 0.95f - i * 0.05f);
            fulu_rotations[i]      = new Vector3(0f, -90f, 0f);
            fulu_positions[i + 28] = new Vector3(-0.95f, 0.04f, -0.95f + i * 0.05f);
            fulu_rotations[i + 28] = new Vector3(0f, 90f, 0f);
            fulu_positions[i + 14] = new Vector3(-0.95f + i * 0.05f, 0.04f, 0.95f);
            fulu_rotations[i + 14] = new Vector3(0f, 180f, 0f);
            fulu_positions[i + 42] = new Vector3(0.95f - i * 0.05f, 0.04f, -0.95f);
            fulu_rotations[i + 42] = new Vector3(0f, 0f, 0f);
        }

        for (int i = 0; i < 30; i++)
        {
            int c = i % 6;
            int r = i / 6;
            pushedCardPos[i]      = new Vector3(0.3f + r * 0.07f, 0.03f, -0.15f + c * 0.05f);
            pushedCardPos[i + 60] = new Vector3(-0.3f - r * 0.07f, 0.03f, 0.15f - c * 0.05f);
            pushedCardPos[i + 30] = new Vector3(0.15f - c * 0.05f, 0.03f, 0.3f + r * 0.07f);
            pushedCardPos[i + 90] = new Vector3(-0.15f + c * 0.05f, 0.03f, -0.3f - r * 0.07f);
        }

        for (int i = 0; i < CARD_NUM; i++)
        {
            cards[i] = Instantiate(cards_prefab[i / 4], new Vector3(-1f, -5f - i, -1f), Quaternion.Euler(0f, 0f, 0f));
            cards[i].transform.localScale = new Vector3(0.0065f, 0.0065f, 0.0065f);
            cards[i].transform.GetComponent <Rigidbody>().freezeRotation = true;
            cards[i].transform.GetComponent <Rigidbody>().useGravity     = false;
            cards[i].transform.GetComponent <Rigidbody>().mass           = 1000000;
        }
        initRound();
        initCard();
        network = new Network("10.0.0.8");
        /*for test*/
        //StartCoroutine(startSimulation());
        StartCoroutine(sendCardStatus());
        StartCoroutine(sendInfoStatus());
    }
Exemplo n.º 6
0
 void Start()
 {
     planeObj = GameObject.Find("Plane");
     // get the gestures listener
     gestureListener = GestureDetect.Instance;
 }
Exemplo n.º 7
0
 void Awake()
 {
     instance = this;
 }
Exemplo n.º 8
0
 void Start()
 {
     // get the gestures listener
     gestureListener = GestureDetect.Instance;
 }