Implemented the event-based logic for the Kinect V2.