コード例 #1
0
 //> -1 means a block
 public bool IsStopLightBlockDirection(int vehicleDirection, out bool isStopLight)
 {
     isStopLight = false;
     if (mapObject != null)
     {
         if (mapObject.mapObjectProperties.mapObjectType == MapObjectType.STOPLIGHT)
         {
             StopLight stopLight = (StopLight)mapObject.mapObjectProperties;
             if (vehicleDirection == stopLight.blockDirection)
             {
                 isStopLight = true;
                 if (stopLight.IsBlocked())
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }