Esempio n. 1
0
        // Token: 0x0600154C RID: 5452 RVA: 0x00075924 File Offset: 0x00073B24
        protected virtual void ToggleHighlightAlias(bool state, string transformPath, Color?highlight, float duration = 0f)
        {
            Transform elementTransform = this.GetElementTransform(transformPath);

            if (elementTransform)
            {
                if (state)
                {
                    VRTK_ObjectAppearance.HighlightObject(elementTransform.gameObject, (highlight != null) ? highlight : new Color?(Color.white), duration);
                    return;
                }
                VRTK_ObjectAppearance.UnhighlightObject(elementTransform.gameObject);
            }
        }
Esempio n. 2
0
        protected virtual void ToggleHighlightAlias(bool state, string transformPath, Color?highlight, float duration = 0f)
        {
            Transform element = GetElementTransform(transformPath);

            if (element)
            {
                if (state)
                {
                    VRTK_ObjectAppearance.HighlightObject(element.gameObject, (highlight != null ? highlight : Color.white), duration);
                }
                else
                {
                    VRTK_ObjectAppearance.UnhighlightObject(element.gameObject);
                }
            }
        }
Esempio n. 3
0
 /// <summary>
 /// The UnhighlightElement method attempts to remove the highlight from the specific controller element.
 /// </summary>
 /// <param name="elementType">The element type on the controller.</param>
 public virtual void UnhighlightElement(SDK_BaseController.ControllerElements elementType)
 {
     if (!controllerHighlighted)
     {
         Transform element = GetElementTransform(GetPathForControllerElement(elementType));
         if (element != null)
         {
             VRTK_ObjectAppearance.UnhighlightObject(element.gameObject);
             SetColourParameter(elementType, Color.clear);
         }
     }
     else if (highlightController != Color.clear && GetColourParameter(elementType) != highlightController)
     {
         HighlightElement(elementType, highlightController, 0f);
     }
 }
Esempio n. 4
0
 // Token: 0x0600153C RID: 5436 RVA: 0x00075294 File Offset: 0x00073494
 public virtual void UnhighlightElement(SDK_BaseController.ControllerElements elementType)
 {
     if (!this.controllerHighlighted)
     {
         Transform elementTransform = this.GetElementTransform(this.GetPathForControllerElement(elementType));
         if (elementTransform != null)
         {
             VRTK_ObjectAppearance.UnhighlightObject(elementTransform.gameObject);
             this.SetColourParameter(elementType, Color.clear);
             return;
         }
     }
     else if (this.highlightController != Color.clear && this.GetColourParameter(elementType) != this.highlightController)
     {
         this.HighlightElement(elementType, this.highlightController, 0f);
     }
 }
Esempio n. 5
0
 public static void UnhighlightObject(GameObject model)
 {
     VRTK_ObjectAppearance.UnhighlightObject(model);
 }