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