protected override void AddTraffic() { BusPath busPath = Lane.Paths[PathIndex] as BusPath; if (busPath != null) { Target.TrafficLight.AddTraffic(this, busPath.PathDirection.GetHashCode()); } else { Target.TrafficLight.AddTraffic(this); } }
protected override bool LightIsGreen() { BusPath busPath = Lane.Paths[PathIndex] as BusPath; if (busPath != null) // Driving on a buslane { return(Target.TrafficLight == null || busPath.AllowedWithStatus(Target.TrafficLight.Status)); } else { return(Target.TrafficLight == null || Target.TrafficLight.Status == 2); } }