public void OnEvent(Events.BuildingSelectionConfirmedEvent e)
    {
        if (lastSelectedBuilding != null)
        {
            // TODO: Instantiate without position leads to flickering around zero origin when display shows up
            GameObject display = GameObject.Instantiate(displayPrefab);
            display.GetComponent <DisplayBehaviour>().SetData(lastSelectedBuilding, lastSelectedBuildingPosition, VRTK_DeviceFinder.HeadsetTransform());
            //VRTK_DeviceFinder.GetControllerRightHand().GetComponent<VRTK_ControllerActions>().ToggleHighlightTouchpad(false);
            EventBus.Post(new ChangeInteractionConceptEvent(InteractionConcept.Idle));
            Hint.Confirm("BuildingSelectionConfirmHint");
            Hint.Confirm("BuildingSelectionHint");
            Hint.Confirm("BuildingSelectionTriggerHint");
        }
        if (selectionOnFloor)
        {
            BlurOptimized blur = VRTK_DeviceFinder.HeadsetCamera().GetComponent <BlurOptimized>();
            blur.enabled = true;

            Transform playArea = VRTK_DeviceFinder.PlayAreaTransform();
            Hint.Confirm("HowToNavigateHint");

            AnimateThis playAreaAnimation = playArea.GetComponent <AnimateThis>();
            playAreaAnimation.CancelAll();
            playAreaAnimation.Transformate()
            .ToPosition(lastSelectedFloorPosition)
            .Duration(0.2f)
            .Ease(AnimateThis.EaseInQuintic)
            .OnEnd(OnNavigationAnimationComplete)
            .Start();
        }
    }
示例#2
0
 private void OnSliderMoved(SliderControl sliderControl)
 {
     Hint.Confirm("HowToScaleTranslate1Hint");
     Hint.Confirm("HowToScaleTranslate2Hint");
     Hint.Confirm("ScaleTranslateTriggerHint");
 }