public void SetupTimedTrafficLight(IList <ushort> nodeGroup) { if (IsManualLight()) { DestroyManualTrafficLight(); } Constants.ManagerFactory.CustomSegmentLightsManager.AddNodeLights(NodeId); TimedLight = new TimedTrafficLights(NodeId, nodeGroup); }
public bool SetUpTimedTrafficLight(IList <ushort> nodeGroup) { if (IsManualLight()) { DestroyManualTrafficLight(); } if (IsTimedLight()) { return(false); } Constants.ServiceFactory.NetService.ProcessNode(NodeId, delegate(ushort nId, ref NetNode node) { Constants.ManagerFactory.TrafficLightManager.AddTrafficLight(nId, ref node); return(true); }); Constants.ManagerFactory.CustomSegmentLightsManager.AddNodeLights(NodeId); TimedLight = new TimedTrafficLights(NodeId, nodeGroup); Type = TrafficLightSimulationType.Timed; return(true); }