Ejemplo n.º 1
0
        /// <summary>
        /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
        /// </summary>
        /// <param name="element">The controller element to look up.</param>
        /// <param name="hand">The controller hand to look up.</param>
        /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
        /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
        public override string GetControllerElementPath(ControllerElements element, ControllerHand hand, bool fullPath = false)
        {
            string suffix = (fullPath ? "/attach" : "");

            switch (element)
            {
            case ControllerElements.AttachPoint:
                return("");

            case ControllerElements.Trigger:
                return("" + suffix);

            case ControllerElements.GripLeft:
                return("" + suffix);

            case ControllerElements.GripRight:
                return("" + suffix);

            case ControllerElements.Touchpad:
                return("" + suffix);

            case ControllerElements.ButtonOne:
                return("" + suffix);

            case ControllerElements.SystemMenu:
                return("" + suffix);

            case ControllerElements.Body:
                return("");
            }
            return(null);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
 /// </summary>
 /// <param name="element">The controller element to look up.</param>
 /// <param name="hand">The controller hand to look up.</param>
 /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
 /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
 public override string GetControllerElementPath(ControllerElements element, ControllerHand hand, bool fullPath = false)
 {
     switch (element)
     {
     case ControllerElements.AttachPoint:
         return("AttachPoint");
     }
     return("");
 }
Ejemplo n.º 3
0
        /// <summary>
        /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
        /// </summary>
        /// <param name="element">The controller element to look up.</param>
        /// <param name="hand">The controller hand to look up.</param>
        /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
        /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
        public override string GetControllerElementPath(ControllerElements element, ControllerHand hand, bool fullPath = false)
        {
            if (GetAvatar())
            {
                var suffix = (fullPath ? "" : "");
                var parent = "controller_" + (hand == ControllerHand.Left ? "left" : "right") + "_renderPart_0";
                var prefix = (hand == ControllerHand.Left ? "l" : "r") + "ctrl:";
                var child  = prefix + (hand == ControllerHand.Left ? "left" : "right") + "_touch_controller_world";

                var path = parent + "/" + child + "/" + prefix + "b_";

                switch (element)
                {
                case ControllerElements.AttachPoint:
                    return(null);

                case ControllerElements.Trigger:
                    return(path + "trigger" + suffix);

                case ControllerElements.GripLeft:
                    return(path + "hold" + suffix);

                case ControllerElements.GripRight:
                    return(path + "hold" + suffix);

                case ControllerElements.Touchpad:
                    return(path + "stick/" + prefix + "b_stick_IGNORE" + suffix);

                case ControllerElements.ButtonOne:
                    return(path + "button01" + suffix);

                case ControllerElements.ButtonTwo:
                    return(path + "button02" + suffix);

                case ControllerElements.SystemMenu:
                    return(path + "button03" + suffix);

                case ControllerElements.StartMenu:
                    return(path + "button03" + suffix);

                case ControllerElements.Body:
                    return(parent);
                }
            }
            return(null);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
        /// </summary>
        /// <param name="element">The controller element to look up.</param>
        /// <param name="hand">The controller hand to look up.</param>
        /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
        /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
        public override string GetControllerElementPath(ControllerElements element, ControllerHand hand, bool fullPath = false)
        {
            //TODO: Use Gvr's tooltips or add an attach object ourselves
            string dd  = "Controller/ddcontroller/";
            string pad = dd + "Tooltips/TouchPadOutside";
            string app = dd + "Tooltips/AppButtonOutside";

            switch (element)
            {
            case ControllerElements.AttachPoint:
                return(pad);    //TODO: attach point at tip of controller?

            case ControllerElements.Touchpad:
                return(pad);

            case ControllerElements.ButtonOne:
                return(app);

            default:
                return(dd);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
        /// </summary>
        /// <param name="element">The controller element to look up.</param>
        /// <param name="hand">The controller hand to look up.</param>
        /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
        /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
        public override string GetControllerElementPath(ControllerElements element, ControllerHand hand, bool fullPath = false)
        {
            var suffix = (fullPath ? "/attach" : "");

            switch (element)
            {
            case ControllerElements.AttachPoint:
                return("tip/attach");

            case ControllerElements.Trigger:
                return("trigger" + suffix);

            case ControllerElements.GripLeft:
                return(GetControllerGripPath(hand, suffix, ControllerHand.Left));

            case ControllerElements.GripRight:
                return(GetControllerGripPath(hand, suffix, ControllerHand.Right));

            case ControllerElements.Touchpad:
                return(GetControllerTouchpadPath(hand, suffix));

            case ControllerElements.ButtonOne:
                return(GetControllerButtonOnePath(hand, suffix));

            case ControllerElements.ButtonTwo:
                return(GetControllerButtonTwoPath(hand, suffix));

            case ControllerElements.SystemMenu:
                return(GetControllerSystemMenuPath(hand, suffix));

            case ControllerElements.StartMenu:
                return(GetControllerStartMenuPath(hand, suffix));

            case ControllerElements.Body:
                return("body");
            }
            return(null);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
        /// </summary>
        /// <param name="element">The controller element to look up.</param>
        /// <param name="hand">The controller hand to look up.</param>
        /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
        /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
        public override string GetControllerElementPath(ControllerElements element, ControllerHand hand, bool fullPath = false)
        {
            var suffix   = (fullPath ? "" : "");
            var handName = (hand == ControllerHand.Left) ? "cobra02-L" : "cobra02-R";
            var path     = handName + "/Dummy";

            switch (element)
            {
            case ControllerElements.AttachPoint:
                return(path + "/object_8");

            case ControllerElements.Trigger:
                return(path + "/object_2" + suffix);

            case ControllerElements.GripLeft:
                return(path + "/object_5" + suffix);

            case ControllerElements.GripRight:
                return(path + "/object_4" + suffix);

            case ControllerElements.Touchpad:
                return(path + "/Cylinder001" + suffix);

            case ControllerElements.ButtonOne:
                return(path + "/Cylinder002" + suffix);

            case ControllerElements.ButtonTwo:
                return(path + "/Cylinder003" + suffix);

            case ControllerElements.SystemMenu:
                return(path + "/Cylinder003" + suffix);

            case ControllerElements.Body:
                return(path + "/object_1");
            }
            return(null);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
 /// </summary>
 /// <param name="element">The controller element to look up.</param>
 /// <param name="hand">The controller hand to look up.</param>
 /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
 /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
 public override string GetControllerElementPath(ControllerElements element, ControllerHand hand, bool fullPath = false)
 {
     return("");
 }
Ejemplo n.º 8
0
 /// <summary>
 /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
 /// </summary>
 /// <param name="element">The controller element to look up.</param>
 /// <param name="hand">The controller hand to look up.</param>
 /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
 /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
 public abstract string GetControllerElementPath(ControllerElements element, ControllerHand hand, bool fullPath = false);