void InteractionRectangle(ref structRectangle rectangle, Joint joint) { if ((countdown.Elapsed - rectangle.beginTime).Seconds > 1) { canvas.Children.Add(rectangle.rect); if (joint.Intersection(rectangle.rect)) { switch (joint.JointType) { case JointType.HandLeft: if (rectangle.handState == leftHandState) UpdateRectangleThingsMain(ref rectangle); break; case JointType.HandRight: if (rectangle.handState == rightHandState) UpdateRectangleThingsMain(ref rectangle); break; } } } }