Kinect.KinectManager.IsGestureComplete C# (CSharp) Method

IsGestureComplete() public method

Determines whether the given gesture for the specified user is complete.
public IsGestureComplete ( Int64 UserId, KinectGestures gesture, bool bResetOnComplete ) : bool
UserId Int64 User ID
gesture KinectGestures Gesture type
bResetOnComplete bool If set to true, resets the gesture state.
return bool
        public bool IsGestureComplete(Int64 UserId, KinectGestures.Gestures gesture, bool bResetOnComplete)
        {
            List<KinectGestures.GestureData> gesturesData = playerGesturesData.ContainsKey(UserId) ? playerGesturesData[UserId] : null;
            int index = gesturesData != null ? GetGestureIndex(gesture, ref gesturesData) : -1;

            if (index >= 0)
            {
                KinectGestures.GestureData gestureData = gesturesData[index];

                if (bResetOnComplete && gestureData.complete)
                {
                    ResetPlayerGestures(UserId);
                    return true;
                }

                return gestureData.complete;
            }

            return false;
        }
KinectManager