private void HighLight(Transform target, Color color) { VRTK_BaseHighlighter highlighter = (target != null ? target.GetComponent <VRTK_BaseHighlighter>() : null); if (highlighter != null) { highlighter.Initialise(); if (target.gameObject.tag == "1") { SceneManager.LoadScene(1); } if (target.gameObject.tag == "2") { SceneManager.LoadScene(0); } if (color != Color.clear) { highlighter.Highlight(color); } else { highlighter.Unhighlight(); } } }
/// <summary> /// The Unhighlight method turns off the highlighter. /// </summary> public virtual void Unhighlight() { if (baseHighlighter != null) { baseHighlighter.Unhighlight(); } }
protected virtual void OnApplicationQuit() { if (objectHighlighter != null) { objectHighlighter.Unhighlight(); } }
private void OnApplicationQuit() { if (objectHighlighter) { objectHighlighter.Unhighlight(); } }
private void unhighlight() { if (_highlighter != null) { _highlighter.Unhighlight(null); } }
private void ToggleHighlight(Transform target, Color color, bool flag) { VRTK_BaseHighlighter highligher = (target != null ? target.GetComponentInChildren <VRTK_BaseHighlighter>() : null); //VRTK_BaseHighlighter highligher = target.GetComponentInChildren<VRTK_BaseHighlighter>(); if (highligher != null && highligher.enabled) { if (target.tag == "InteractionObject") { GameManager._Instance.isCanToMicroscope = flag; } if (target.tag == "Microscope") { GameManager._Instance.isMicroscope = flag; } highligher.Initialise(); if (color != Color.clear) { highligher.Highlight(color); } else { highligher.Unhighlight(); } } }
private void M_VRTKIO_InteractableObjectGrabbed(object sender, InteractableObjectEventArgs e) { if (!m_isActivated) { return; } m_Highter.Unhighlight(); }
protected virtual void InternalUnhighlightObject(GameObject model) { VRTK_BaseHighlighter highlighter = model.GetComponentInChildren <VRTK_BaseHighlighter>(); if (model.activeInHierarchy && highlighter != null) { highlighter.Unhighlight(); } }
/// <summary> /// 隐藏外框 /// </summary> public void HideLine(object sender, DestinationMarkerEventArgs e) { if (highlighter != null) { highlighter.Initialise(); highlighter.Unhighlight(); highlighter = null; } }
public void OnTriggerExit(Collider other) { if (other.gameObject.GetComponent <Dupeable>() == null) { return; } ObjectInHighlighter = null; Highlighter.Unhighlight(); }
/// <summary> /// The ToggleHighlight method is used to turn on or off the colour highlight of the object. /// </summary> /// <param name="toggle">The state to determine whether to activate or deactivate the highlight. `true` will enable the highlight and `false` will remove the highlight.</param> public virtual void ToggleHighlight(bool toggle) { InitialiseHighlighter(); if (touchHighlightColor != Color.clear && objectHighlighter) { if (toggle && !IsGrabbed()) { objectHighlighter.Highlight(touchHighlightColor); } else { objectHighlighter.Unhighlight(); } } }
protected virtual void ToggleHighlight(Transform target, Color color) { VRTK_BaseHighlighter highligher = (target != null ? target.GetComponentInChildren <VRTK_BaseHighlighter>() : null); if (highligher != null) { highligher.Initialise(); if (color != Color.clear) { highligher.Highlight(color); } else { highligher.Unhighlight(); } } }
private void ToggleHighlight(Transform target, Color color, bool flag) { VRTK_BaseHighlighter highligher = (target != null ? target.GetComponentInChildren <VRTK_BaseHighlighter>() : null); if (highligher != null) { highligher.Initialise(); if (color != Color.clear) { highligher.Highlight(color, 0.5f); } else { highligher.Unhighlight(); } } }
private void HightLight(Transform target, Color color) { VRTK_BaseHighlighter hightLighter = (target != null ? target.GetComponent <VRTK_BaseHighlighter>() : null); if (hightLighter != null) { hightLighter.Initialise(); if (color != Color.clear) { hightLighter.Highlight(color); } else { hightLighter.Unhighlight(); } } }
/// <summary> /// The ToggleHighlight/2 method is used to turn on or off the colour highlight of the object. /// </summary> /// <param name="toggle">The state to determine whether to activate or deactivate the highlight. `true` will enable the highlight and `false` will remove the highlight.</param> /// <param name="globalHighlightColor">The colour to use when highlighting the object.</param> public virtual void ToggleHighlight(bool toggle, Color globalHighlightColor) { if (highlightOnTouch) { if (toggle && !IsGrabbed() && !IsUsing()) { Color color = (touchHighlightColor != Color.clear ? touchHighlightColor : globalHighlightColor); if (color != Color.clear) { objectHighlighter.Highlight(color); } } else { objectHighlighter.Unhighlight(); } } }
protected virtual void CreatePermanentClone() { VRTK_BaseHighlighter currentSnappedObjectHighlighter = currentSnappedObject.GetComponent <VRTK_BaseHighlighter>(); if (currentSnappedObjectHighlighter != null) { currentSnappedObjectHighlighter.Unhighlight(); } objectToClone = Instantiate(currentSnappedObject); Collider[] clonedObjectStates = currentSnappedObject.GetComponentsInChildren <Collider>(); clonedObjectColliderStates = new bool[clonedObjectStates.Length]; for (int i = 0; i < clonedObjectStates.Length; i++) { Collider clonedObjectColliderState = clonedObjectStates[i]; clonedObjectColliderStates[i] = clonedObjectColliderState.isTrigger; clonedObjectColliderState.isTrigger = true; } objectToClone.SetActive(false); }
// Token: 0x0600120E RID: 4622 RVA: 0x00068168 File Offset: 0x00066368 protected virtual void CreatePermanentClone() { VRTK_BaseHighlighter component = this.currentSnappedObject.GetComponent <VRTK_BaseHighlighter>(); if (component != null) { component.Unhighlight(null, 0f); } this.objectToClone = Object.Instantiate <GameObject>(this.currentSnappedObject); Collider[] componentsInChildren = this.currentSnappedObject.GetComponentsInChildren <Collider>(); this.clonedObjectColliderStates = new bool[componentsInChildren.Length]; for (int i = 0; i < componentsInChildren.Length; i++) { Collider collider = componentsInChildren[i]; this.clonedObjectColliderStates[i] = collider.isTrigger; collider.isTrigger = true; } this.objectToClone.SetActive(false); }
/// <summary> /// apply "color" to "target" to highlight the target /// </summary> /// <param name="target"></param> /// <param name="color"></param> protected virtual void ToggleHighlight(Transform target, Color color) { if (targetLabel != "State" && (targetLabel == "Country" && theTarget.GetComponent <StateInteraction>().interactable == true)) { // only highlight the states on the country map VRTK_BaseHighlighter highligher = (target != null ? target.GetComponentInChildren <VRTK_BaseHighlighter>() : null); if (highligher != null) { highligher.Initialise(); if (color != Color.clear) { highligher.Highlight(color); } else { highligher.Unhighlight(); } } } }
/// <summary> /// The ToggleHighlight/2 method is used to turn on or off the colour highlight of the object. /// </summary> /// <param name="toggle">The state to determine whether to activate or deactivate the highlight. `true` will enable the highlight and `false` will remove the highlight.</param> /// <param name="globalHighlightColor">The colour to use when highlighting the object.</param> public virtual void ToggleHighlight(bool toggle, Color globalHighlightColor) { if (highlightOnTouch && objectHighlighter == null) { InitialiseHighlighter(); } if (objectHighlighter && highlightOnTouch) { if (toggle && !IsGrabbed()) { Color color = (touchHighlightColor != Color.clear ? touchHighlightColor : globalHighlightColor); if (color != Color.clear) { objectHighlighter.Highlight(color); } } else { objectHighlighter.Unhighlight(); } } }