public void OnEvent(StopInteractionConceptEvent e)
 {
     if (e.oldConcept.ToString().Equals(interactionConceptName))
     {
         gameObject.SetActive(false);
     }
 }
 public void OnEvent(StopInteractionConceptEvent c)
 {
     if (c.oldConcept == InteractionConcept.Calibration)
     {
         UnRegisterHandler();
     }
 }
Esempio n. 3
0
    public void OnEvent(StopInteractionConceptEvent e)
    {
        if (e.oldConcept == InteractionConcept.ReadyForCalibration)
        {
            VRTK_ControllerEvents leftController  = VRTK.VRTK_DeviceFinder.GetControllerLeftHand().GetComponent <VRTK_ControllerEvents>();
            VRTK_ControllerEvents rightController = VRTK.VRTK_DeviceFinder.GetControllerRightHand().GetComponent <VRTK_ControllerEvents>();

            leftController.GripPressed  -= startCalibration;
            rightController.GripPressed -= startCalibration;
        }
    }
Esempio n. 4
0
    public void OnEvent(StopInteractionConceptEvent e)
    {
        if (e.oldConcept == InteractionConcept.Selection)
        {
            VRTK_ControllerEvents rightController = VRTK.VRTK_DeviceFinder.GetControllerRightHand().GetComponent <VRTK_ControllerEvents>();

            rightController.TriggerTouchEnd -= startIdle;
            rightController.TouchpadPressed -= selectionConfirmed;

            Hint.Hide("BuildingSelectionConfirmHint");
        }
    }
Esempio n. 5
0
    public void OnEvent(StopInteractionConceptEvent e)
    {
        if (e.oldConcept == InteractionConcept.Idle)
        {
            VRTK_ControllerEvents leftController  = VRTK.VRTK_DeviceFinder.GetControllerLeftHand().GetComponent <VRTK_ControllerEvents>();
            VRTK_ControllerEvents rightController = VRTK.VRTK_DeviceFinder.GetControllerRightHand().GetComponent <VRTK_ControllerEvents>();

            leftController.TriggerTouchStart  -= startScaleRotate;
            rightController.TriggerTouchStart -= startSelectNavigate;

            Hint.Hide("BuildingSelectionTriggerHint");
            Hint.Hide("ScaleTranslateTriggerHint");
        }
    }
 public void OnEvent(StopInteractionConceptEvent e)
 {
     if (e.oldConcept == InteractionConcept.Selection)
     {
         Hint.Hide("HowToNavigateHint");
         if (navigationHint != null)
         {
             Destroy(navigationHint);
         }
         if (currentSelectionObject != null)
         {
             Destroy(currentSelectionObject);
         }
     }
 }
Esempio n. 7
0
    public void OnEvent(StopInteractionConceptEvent e)
    {
        if (e.oldConcept == InteractionConcept.ScaleRotate)
        {
            VRTK_ControllerEvents leftController = VRTK.VRTK_DeviceFinder.GetControllerLeftHand().GetComponent <VRTK_ControllerEvents>();

            leftController.TriggerAxisChanged -= showScaleRotateMenu;
            leftController.TriggerTouchEnd    -= startIdle;

            // reset animation and hide menu
            scaleRotateMenu.gameObject.GetComponent <ScaleAnimator>().ResetAnimation();
            scaleRotateMenu.SetActive(false);

            Hint.Hide("HowToScaleTranslate1Hint");
            Hint.Hide("HowToScaleTranslate2Hint");
        }
    }