Exemplo n.º 1
0
 public static Transform GetTooltipTransform(VRDevice device, Tooltips.Location location)
 {
     if (device == VRDevice.PrimaryController)
     {
         return(instance.VRControllers.GetPrimaryTooltipTransform(location));
     }
     else
     {
         return(instance.VRControllers.GetSecondaryTooltipTransform(location));
     }
 }
Exemplo n.º 2
0
 internal Transform GetSecondaryTooltipTransform(Tooltips.Location location)
 {
     if (null == leftController || null == inverseRightController)
     {
         InitializeControllersFromModel(ControllerModel.Quest);
     }
     if (GlobalState.Settings.rightHanded)
     {
         return(GetTooltipTransform(leftController, location));
     }
     else
     {
         return(GetTooltipTransform(inverseRightController, location));
     }
 }
Exemplo n.º 3
0
        private Transform GetTooltipTransform(VRController controller, Tooltips.Location location)
        {
            switch (location)
            {
            case Tooltips.Location.Grip: return(controller.gripDisplay);

            case Tooltips.Location.Joystick: return(controller.joystickDisplay);

            case Tooltips.Location.Primary: return(controller.primaryButtonDisplay);

            case Tooltips.Location.Secondary: return(controller.secondaryButtonDisplay);

            case Tooltips.Location.Trigger: return(controller.triggerDisplay);

            default: return(null);
            }
        }