Example #1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "Wire" && !m_wire) {
         m_wire = col.gameObject.GetComponent<SnippableWire>();
         m_wire.setIsHighlighted(true);
     }
 }
Example #2
0
 void OnTriggerExit(Collider col)
 {
     if (m_wire && col.gameObject == m_wire.gameObject)
     {
         m_wire.setIsHighlighted(false);
         m_wire = null;
     }
 }
Example #3
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "Wire" && !m_wire)
     {
         m_wire = col.gameObject.GetComponent <SnippableWire>();
         m_wire.setIsHighlighted(true);
     }
 }