Kinect.KinectManager.GetGestureProgress C# (CSharp) Method

GetGestureProgress() public method

Gets the progress (in range [0, 1]) of the given gesture for the specified user.
public GetGestureProgress ( Int64 UserId, KinectGestures gesture ) : float
UserId Int64 User ID
gesture KinectGestures Gesture type
return float
        public float GetGestureProgress(Int64 UserId, KinectGestures.Gestures gesture)
        {
            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];
                return gestureData.progress;
            }

            return 0f;
        }
KinectManager