public void UserDetected(long userId, int userIndex)
{
// the gestures are allowed for the primary user only
KinectManager manager = KinectManager.Instance;
if(!manager || (userIndex != playerIndex))
return;
// detect these user specific gestures
manager.DetectGesture(userId, KinectGestures.Gestures.SwipeLeft);
manager.DetectGesture(userId, KinectGestures.Gestures.SwipeRight);
manager.DetectGesture(userId, KinectGestures.Gestures.SwipeUp);
manager.DetectGesture(userId, KinectGestures.Gestures.Tpose);
manager.DetectGesture(userId, KinectGestures.Gestures.LeanLeft);
manager.DetectGesture(userId, KinectGestures.Gestures.LeanRight);
manager.DetectGesture(userId, KinectGestures.Gestures.Stop);
manager.DetectGesture(userId, KinectGestures.Gestures.LeanForward);
manager.DetectGesture(userId, KinectGestures.Gestures.LeanBack);
sGestureText = "change the slides.";
}