Exemple #1
0
        public override void dragStop(ref GestureRecognition gr, ref Pixie pixie)
        {
            int gesture_id = gr.endStroke(ref similarity, ref pos, ref scale, ref dir0, ref dir1, ref dir2);

            if (gesture_id == gestureid_flip)
            {
                pixie.triggerFlip(pos, dir0);
                this.num_commands_issued += 1;
                Sample_Pixie.HUDText.text = "That's your new gesture. Nice!\nTry it a few more times.\n(" + this.num_commands_issued + "/4)";
            }
            else if (gesture_id == gestureid_spin)
            {
                pixie.triggerSpin(pos);
                Sample_Pixie.HUDText.text = "That's a 'spin' gesture. Nice!\nTry a few more times.\n(" + this.num_commands_issued + "/4)";
            }
            else if (gesture_id == gestureid_go)
            {
                pixie.triggerGo(pos + (dir0 * 6.0f * (float)scale));
                Sample_Pixie.HUDText.text = "That's a 'go there' gesture. Nice!\nTry a few more times.\n(" + this.num_commands_issued + "/4)";
            }
            else if (gesture_id == gestureid_come)
            {
                pixie.triggerCome(pos);
                Sample_Pixie.HUDText.text = "That's a 'come here' gesture. Nice!\nTry a few more times.\n(" + this.num_commands_issued + "/4)";
            }
            if (this.num_commands_issued >= 4)
            {
                this.completed            = true;
                Sample_Pixie.HUDText.text = "";
            }
        }
Exemple #2
0
        public override void dragStop(ref GestureRecognition gr, ref Pixie pixie)
        {
            int gesture_id = gr.endStroke(ref similarity, ref pos, ref scale, ref dir0, ref dir1, ref dir2);

            if (gesture_id == gestureid_peekaboo)
            {
                pixie.triggerPeekaboo();
                Sample_Pixie.HUDText.text = "That's your new gesture. Awesome!\nFeel try to try out any gesture.";
            }
            else if (gesture_id == gestureid_flip)
            {
                pixie.triggerFlip(pos, dir0);
                Sample_Pixie.HUDText.text = "That's your previous gesture. Cool!\nFeel try to try out any gesture.";
            }
            else if (gesture_id == gestureid_spin)
            {
                pixie.triggerSpin(pos);
                Sample_Pixie.HUDText.text = "That's a 'spin' gesture. Nice!\nFeel try to try out any gesture.";
            }
            else if (gesture_id == gestureid_go)
            {
                pixie.triggerGo(pos + (dir0 * 6.0f * (float)scale));
                Sample_Pixie.HUDText.text = "That's a 'go there' gesture. Splended!\nMake it larger to send the pixie further away.";
            }
            else if (gesture_id == gestureid_come)
            {
                pixie.triggerCome(pos);
                Sample_Pixie.HUDText.text = "That's a 'come here' gesture. Not bad!\nFeel try to try out any gesture.";
            }
        }
Exemple #3
0
        public override void dragStop(ref GestureRecognition gr, ref Pixie pixie)
        {
            int gesture_id = gr.endStroke(ref similarity, ref pos, ref scale, ref dir0, ref dir1, ref dir2);

            if (gesture_id == gestureid_go)
            {
                pixie.triggerGo(pos + (dir0 * 6.0f * (float)scale));
                this.completed            = true;
                Sample_Pixie.HUDText.text = "";
            }
        }