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