Ejemplo n.º 1
0
        public virtual void ToggleControllerModel(bool state, GameObject grabbedChildObject)
        {
            if (!base.enabled)
            {
                return;
            }
            VRTK_SharedMethods.ToggleRenderer(state, this.modelContainer, grabbedChildObject);
            this.controllerVisible = state;
            uint controllerIndex = VRTK_DeviceFinder.GetControllerIndex(base.gameObject);

            if (state)
            {
                this.OnControllerModelVisible(this.SetActionEvent(controllerIndex));
                return;
            }
            this.OnControllerModelInvisible(this.SetActionEvent(controllerIndex));
        }
Ejemplo n.º 2
0
        public virtual void ToggleControllerModel(bool state, GameObject grabbedChildObject)
        {
            if (!enabled)
            {
                return;
            }

            VRTK_SharedMethods.ToggleRenderer(state, modelContainer, grabbedChildObject);

            //<obsolete>
            controllerVisible = state;
            var controllerIndex = VRTK_DeviceFinder.GetControllerIndex(gameObject);

            if (state)
            {
                OnControllerModelVisible(SetActionEvent(controllerIndex));
            }
            else
            {
                OnControllerModelInvisible(SetActionEvent(controllerIndex));
            }
            //</obsolete>
        }