Exemple #1
0
 private void InteractionEnded()
 {
     if (HandCalibrationMode && calibrationController != null && !RightPoseInProgress)
     {
         if (flowController.AddCalibrationController(calibrationController) &&
             flowController.leftHandEnabled && flowController.rightHandEnabled)
         {
             HandCalibrationMode = false;
             flowController.CalibrationFinished();
         }
         else
         {
             TextToSpeech.Instance.StopSpeaking();
             audioSource.Stop();
             if (calibrationController.IsRightHand() && flowController.leftHandEnabled)
             {
                 if (uiController.greekEnabled)
                 {
                     uiController.PrintText("Tο δεξι χέρι βαθμονομήθηκε επιτυχώς." + "\n" + "Επαναλάβετε την ίδια διαδικασία με το αριστερό χέρι σας");
                     audioSource.Stop();
                     audioSource.clip = uiController.doLeftCalibClip;
                     audioSource.Play();
                 }
                 else
                 {
                     uiController.PrintText("Right Hand calibrated successfully." + "\n" + "Now let's calibrate the left one");
                     TextToSpeech.Instance.StopSpeaking();
                     TextToSpeech.Instance.StartSpeaking("Right Hand calibrated successfully. Now let's calibrate the left one");
                 }
             }
             else if (!calibrationController.IsRightHand() && flowController.rightHandEnabled)
             {
                 if (uiController.greekEnabled)
                 {
                     uiController.PrintText("Tο αριστερό χέρι βαθμονομήθηκε επιτυχώς." + "\n" + "Επαναλάβετε την ίδια διαδικασία με το δεξί χέρι σας");
                     audioSource.Stop();
                     audioSource.clip = uiController.doRightCalibClip;
                     audioSource.Play();
                 }
                 else
                 {
                     uiController.PrintText("Left Hand calibrated successfully." + "\n" + " Now let's calibrate the right one");
                     TextToSpeech.Instance.StopSpeaking();
                     TextToSpeech.Instance.StartSpeaking("Left Hand calibrated successfully. Now let's calibrate the right one");
                 }
             }
             else
             {
                 HandCalibrationMode = false;
                 flowController.CalibrationFinished();
             }
             calibrationController = null;
         }
         handObject.SetActive(false);
         trackingHand = new HandStruct(false);
     }
 }