void OnTriggerEnter(Collider col) { if (col.tag == "Wire" && !m_wire) { m_wire = col.gameObject.GetComponent<SnippableWire>(); m_wire.setIsHighlighted(true); } }
void OnTriggerExit(Collider col) { if (m_wire && col.gameObject == m_wire.gameObject) { m_wire.setIsHighlighted(false); m_wire = null; } }
void OnTriggerEnter(Collider col) { if (col.tag == "Wire" && !m_wire) { m_wire = col.gameObject.GetComponent <SnippableWire>(); m_wire.setIsHighlighted(true); } }
/// <summary>Attaches this instance to the specified <see cref="SnippableWire"/>, allowing events to be received from the wire.</summary> public void Attach(SnippableWire wire) => wire.ParentComponent = this;