示例#1
0
 public void ToggleLight(char lightSource)
 {
     if (LightSourceListenerMap.ContainsKey(lightSource))
     {
         foreach (ILightSourceListener lightSourceListener in LightSourceListenerMap[lightSource])
         {
             lightSourceListener.ToggleLight();
         }
     }
 }
示例#2
0
 public void SetLightActive(char lightSource, bool state)
 {
     if (LightSourceListenerMap.ContainsKey(lightSource))
     {
         foreach (ILightSourceListener lightSourceListener in LightSourceListenerMap[lightSource])
         {
             lightSourceListener.SetLightActive(state);
         }
     }
 }