Beispiel #1
0
 protected virtual void ShowController(GameObject interactingObject, GameObject ignoredObject)
 {
     if (hideControllerRoutine != null)
     {
         StopCoroutine(hideControllerRoutine);
     }
     VRTK_ObjectAppearance.SetRendererVisible(interactingObject, ignoredObject);
 }
Beispiel #2
0
 // Token: 0x06001570 RID: 5488 RVA: 0x0007607A File Offset: 0x0007427A
 protected virtual void ShowController(GameObject interactingObject, GameObject ignoredObject)
 {
     if (this.hideControllerRoutine != null)
     {
         base.StopCoroutine(this.hideControllerRoutine);
     }
     VRTK_ObjectAppearance.SetRendererVisible(interactingObject, ignoredObject);
     this.OnControllerVisible(this.SetEventPayload(interactingObject, ignoredObject));
 }
Beispiel #3
0
 // Token: 0x060016A2 RID: 5794 RVA: 0x0007A458 File Offset: 0x00078658
 public static void ToggleRenderer(bool state, GameObject model, GameObject ignoredModel = null)
 {
     if (state)
     {
         VRTK_ObjectAppearance.SetRendererVisible(model, ignoredModel);
         return;
     }
     VRTK_ObjectAppearance.SetRendererHidden(model, ignoredModel);
 }
Beispiel #4
0
 protected virtual void ToggleControllerVisibility(bool visible)
 {
     if (grabbedObject != null)
     {
         VRTK_InteractControllerAppearance[] controllerAppearanceScript = grabbedObject.GetComponentsInParent <VRTK_InteractControllerAppearance>(true);
         if (controllerAppearanceScript.Length > 0)
         {
             controllerAppearanceScript[0].ToggleControllerOnGrab(visible, controllerReference.model, grabbedObject);
         }
     }
     else if (visible)
     {
         VRTK_ObjectAppearance.SetRendererVisible(controllerReference.model, grabbedObject);
     }
 }
Beispiel #5
0
 // Token: 0x0600159C RID: 5532 RVA: 0x00076A64 File Offset: 0x00074C64
 protected virtual void ToggleControllerVisibility(bool visible)
 {
     if (this.grabbedObject != null)
     {
         VRTK_InteractControllerAppearance[] componentsInParent = this.grabbedObject.GetComponentsInParent <VRTK_InteractControllerAppearance>(true);
         if (componentsInParent.Length != 0)
         {
             componentsInParent[0].ToggleControllerOnGrab(visible, this.controllerReference.model, this.grabbedObject);
             return;
         }
     }
     else if (visible)
     {
         VRTK_ObjectAppearance.SetRendererVisible(this.controllerReference.model, this.grabbedObject);
     }
 }
Beispiel #6
0
        protected virtual void ToggleControllerVisibility(bool visible)
        {
            GameObject modelContainer = VRTK_DeviceFinder.GetModelAliasController(gameObject);

            if (touchedObject != null)
            {
                VRTK_InteractControllerAppearance[] controllerAppearanceScript = touchedObject.GetComponentsInParent <VRTK_InteractControllerAppearance>(true);
                if (controllerAppearanceScript.Length > 0)
                {
                    controllerAppearanceScript[0].ToggleControllerOnTouch(visible, modelContainer, touchedObject);
                }
            }
            else if (visible)
            {
                VRTK_ObjectAppearance.SetRendererVisible(modelContainer, touchedObject);
            }
        }
        protected override void ToggleControllerVisibility(bool visible)
        {
            if (grabbedObject != null)
            {
                ///[Obsolete]
#pragma warning disable 0618
                VRTK_InteractControllerAppearance[] controllerAppearanceScript = grabbedObject.GetComponentsInParent <VRTK_InteractControllerAppearance>(true);
#pragma warning restore 0618
                if (controllerAppearanceScript.Length > 0)
                {
                    controllerAppearanceScript[0].ToggleControllerOnGrab(visible, controllerReference.model, grabbedObject);
                }
            }
            else if (visible)
            {
                VRTK_ObjectAppearance.SetRendererVisible(controllerReference.model, grabbedObject);
            }
        }
Beispiel #8
0
 public static void SetRendererVisible(GameObject model, GameObject ignoredModel = null)
 {
     VRTK_ObjectAppearance.SetRendererVisible(model, ignoredModel);
 }