Ejemplo n.º 1
0
 public void UnSubscribeFromSwitchEvent()
 {
     if (relatedLightSwitch == null)
     {
         return;
     }
     relatedLightSwitch.SwitchTriggerEvent -= Trigger;
     relatedLightSwitch = null;
 }
Ejemplo n.º 2
0
 public void SubscribeToSwitchEvent(LightSwitchV2 lightSwitch)
 {
     UnSubscribeFromSwitchEvent();
     relatedLightSwitch              = lightSwitch;
     lightSwitch.SwitchTriggerEvent += Trigger;
 }