Ejemplo n.º 1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.tag == "Torch")
     {
         illuminated = false;
         torch       = null;
     }
 }
Ejemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Torch")
     {
         if (other.gameObject.GetComponent <Torch_Toggle>().isLit)
         {
             illuminated = true;
         }
         torch = other.gameObject.GetComponent <Torch_Toggle>();
     }
 }