public ScoreTimer(MainWindow main_window) { this.window = main_window; this.time_to_solve = 12; this.previous_second = 12; this.time_left_milliseconds = (double)time_to_solve * 1000.0; this.successful_solves = 0; this.lives = 3; }
public GesturePartResult Update(Skeleton skeleton) { // left hand to right of left elbow and right hand to the left of right elbow var leftArmCorrect = skeleton.Joints[JointType.HandLeft].Position.X > skeleton.Joints[JointType.ElbowLeft].Position.X; var rightArmCorrect = skeleton.Joints[JointType.HandRight].Position.X < skeleton.Joints[JointType.ElbowRight].Position.X; var handsCorrect = skeleton.Joints[JointType.HandRight].Position.X < skeleton.Joints[JointType.HandLeft].Position.X; if (leftArmCorrect && rightArmCorrect && handsCorrect && MainWindow.LeftHandHighEnough(skeleton) && MainWindow.RightHandHighEnough(skeleton)) { return(GesturePartResult.Succeeded); } return(GesturePartResult.Failed); }