Пример #1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.CompareTag("Wall"))
     {
         wall = col.GetComponent <TransparentableWall>();
     }
 }
Пример #2
0
 void OnTriggerExit(Collider col)
 {
     if (col.CompareTag("Wall"))
     {
         wall = null;
     }
 }