CubeGestureListener.GestureCompleted C# (CSharp) Method

GestureCompleted() public method

Invoked if a gesture is completed.
public GestureCompleted ( long userId, int userIndex, KinectGestures.Gestures gesture, KinectInterop.JointType joint, Vector3, screenPos ) : bool
userId long User ID
userIndex int User index
gesture KinectGestures.Gestures Gesture type
joint KinectInterop.JointType Joint type
screenPos Vector3, Normalized viewport position
return bool
	public bool GestureCompleted (long userId, int userIndex, KinectGestures.Gestures gesture, 
	                              KinectInterop.JointType joint, Vector3 screenPos)
	{
		// the gestures are allowed for the primary user only
		if(userIndex != playerIndex)
			return false;

        sGestureText = gesture + " detected";
        Debug.Log( sGestureText);
        

        if (gesture == KinectGestures.Gestures.SwipeLeft)
			swipeLeft = true;
		if(gesture == KinectGestures.Gestures.SwipeRight)
			swipeRight = true;
	    if(gesture == KinectGestures.Gestures.SwipeUp)
			swipeUp = true;
        if(gesture == KinectGestures.Gestures.RaiseLeftHand)
            RaiseLeftHand = true;
        if (gesture == KinectGestures.Gestures.RaiseRightHand)
            RaiseRightHand = true;
        if (gesture == KinectGestures.Gestures.Tpose)
        {
            Tpose = true;
        }

        else
        {
            Tpose = false;
        }
        return true;
	}