예제 #1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "KeypadButton" && !m_button) {
         m_button = col.gameObject.GetComponent<KeypadButton>();
         m_button.SetHighlight(true);
     }
 }
예제 #2
0
 void OnTriggerExit(Collider col)
 {
     if (m_button && col.gameObject == m_button.gameObject)
     {
         m_button.SetHighlight(false);
         m_button = null;
     }
 }
예제 #3
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "KeypadButton" && !m_button)
     {
         m_button = col.gameObject.GetComponent <KeypadButton>();
         m_button.SetHighlight(true);
     }
 }