예제 #1
0
파일: Tooltips.cs 프로젝트: ubisoft/vrtist
        private static Transform GetTooltipTransform(VRDevice device, Location location)
        {
            Transform controller = GlobalState.GetControllerTransform(device);

            if (null == controller)
            {
                return(null);
            }

            Transform tooltip = null;

            switch (location)
            {
            case Location.Grip: tooltip = controller.Find("GripButtonAnchor/Tooltip"); break;

            case Location.Trigger: tooltip = controller.Find("TriggerButtonAnchor/Tooltip"); break;

            case Location.Primary: tooltip = controller.Find("PrimaryButtonAnchor/Tooltip"); break;

            case Location.Secondary: tooltip = controller.Find("SecondaryButtonAnchor/Tooltip"); break;

            case Location.Joystick: tooltip = controller.Find("JoystickBaseAnchor/Tooltip"); break;
            }
            return(tooltip);
        }
예제 #2
0
파일: Tooltips.cs 프로젝트: ubisoft/vrtist
        private static void SetOpacity(VRDevice device, float angle)
        {
            Transform controller = GlobalState.GetControllerTransform(device);

            if (null == controller)
            {
                return;
            }

            Transform tooltip = controller.Find("GripButtonAnchor/Tooltip");

            SetOpacity(tooltip, angle);
            tooltip = controller.Find("TriggerButtonAnchor/Tooltip");
            SetOpacity(tooltip, angle);
            tooltip = controller.Find("PrimaryButtonAnchor/Tooltip");
            SetOpacity(tooltip, angle);
            tooltip = controller.Find("SecondaryButtonAnchor/Tooltip");
            SetOpacity(tooltip, angle);
            tooltip = controller.Find("JoystickBaseAnchor/Tooltip");
            SetOpacity(tooltip, angle);
        }