public void OnEvent(StartInteractionConceptEvent e)
 {
     if (e.newConcept == InteractionConcept.Selection)
     {
         Hint.Display("HowToNavigateHint");
     }
 }
    // Interaction Events

    public void OnEvent(StartInteractionConceptEvent c)
    {
        if (c.newConcept == InteractionConcept.Calibration)
        {
            RegisterHandler();
        }
    }
 public void OnEvent(StartInteractionConceptEvent e)
 {
     if (e.newConcept.ToString().Equals(interactionConceptName))
     {
         gameObject.SetActive(true);
     }
 }
Пример #4
0
    public void OnEvent(StartInteractionConceptEvent e)
    {
        if (e.newConcept == InteractionConcept.ReadyForCalibration)
        {
            VRTK_ControllerEvents leftController  = VRTK.VRTK_DeviceFinder.GetControllerLeftHand().GetComponent <VRTK_ControllerEvents>();
            VRTK_ControllerEvents rightController = VRTK.VRTK_DeviceFinder.GetControllerRightHand().GetComponent <VRTK_ControllerEvents>();

            startCalibration             = new ControllerInteractionEventHandler(StartCalibration);
            leftController.GripPressed  += startCalibration;
            rightController.GripPressed += startCalibration;
        }
    }
Пример #5
0
    public void OnEvent(StartInteractionConceptEvent e)
    {
        if (e.newConcept == InteractionConcept.Selection)
        {
            VRTK_ControllerEvents rightController = VRTK.VRTK_DeviceFinder.GetControllerRightHand().GetComponent <VRTK_ControllerEvents>();

            startIdle          = new ControllerInteractionEventHandler(StartIdle);
            selectionConfirmed = new ControllerInteractionEventHandler(SelectionConfirmed);
            rightController.TriggerTouchEnd += startIdle;
            rightController.TouchpadPressed += selectionConfirmed;
        }
    }
Пример #6
0
    public void OnEvent(StartInteractionConceptEvent e)
    {
        if (e.newConcept == InteractionConcept.Idle)
        {
            VRTK_ControllerEvents leftController  = VRTK.VRTK_DeviceFinder.GetControllerLeftHand().GetComponent <VRTK_ControllerEvents>();
            VRTK_ControllerEvents rightController = VRTK.VRTK_DeviceFinder.GetControllerRightHand().GetComponent <VRTK_ControllerEvents>();

            startScaleRotate = new ControllerInteractionEventHandler(StartScaleRotate);
            leftController.TriggerTouchStart += startScaleRotate;


            startSelectNavigate = new ControllerInteractionEventHandler(StartSelectNavigate);
            rightController.TriggerTouchStart += startSelectNavigate;

            Hint.Display("BuildingSelectionTriggerHint");
            Hint.Display("ScaleTranslateTriggerHint");
        }
    }
Пример #7
0
    public void OnEvent(StartInteractionConceptEvent e)
    {
        if (e.newConcept == InteractionConcept.ScaleRotate)
        {
            VRTK_ControllerEvents leftController = VRTK.VRTK_DeviceFinder.GetControllerLeftHand().GetComponent <VRTK_ControllerEvents>();

            showScaleRotateMenu = new ControllerInteractionEventHandler(UpdateScaleRotateMenu);
            leftController.TriggerAxisChanged += showScaleRotateMenu;

            startIdle = new ControllerInteractionEventHandler(StartIdle);
            leftController.TriggerTouchEnd += startIdle;

            // set inital animation progress and show menu
            scaleRotateMenu.SetActive(true);
            scaleRotateMenu.gameObject.GetComponent <ScaleAnimator>().SetAnimationProgress(leftController.GetTriggerAxis());

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