CSL_Traffic.LaneManager.CheckLaneConnection C# (CSharp) Метод

CheckLaneConnection() публичный статический Метод

public static CheckLaneConnection ( this laneInfo, ExtendedVehicleType vehicleType, uint from, uint to ) : bool
laneInfo this
vehicleType ExtendedVehicleType
from uint
to uint
Результат bool
        public static bool CheckLaneConnection(this NetInfo.Lane laneInfo, ExtendedVehicleType vehicleType, uint from, uint to)
        {
            if ((vehicleType & sm_routedUnits) == 0)
            {
                return true;
            }

            if ((laneInfo.m_vehicleType & VehicleInfo.VehicleType.Car) == VehicleInfo.VehicleType.None)
            {
                return true;
            }

            // Quick fix for tram
            if ((laneInfo.m_vehicleType & VehicleInfo.VehicleType.Tram) != VehicleInfo.VehicleType.None)
            {
                return true;
            }

            Lane lane = GetLane(from);

            return lane.ConnectsTo(to);
        }
        #endregion