void RemoveLightListener(CarHeading direction, AI_CarController car)
    {
        switch (direction)
        {
        case CarHeading.North:
        case CarHeading.South:
            NorthSouthLightChange -= car.LightChange;
            break;

        case CarHeading.West:
        case CarHeading.East:
            EastWestLightChange -= car.LightChange;
            break;
        }
    }
    public void AddCarToStreetLightEvent(CarHeading heading, AI_CarController car)
    {
        switch (heading)
        {
        case CarHeading.North:
        case CarHeading.South:
            NorthSouthLightChange += car.LightChange;
            break;

        case CarHeading.East:
        case CarHeading.West:
            EastWestLightChange += car.LightChange;
            break;
        }
    }
    public Vector3 NextWaypoint(ref CarHeading heading, out IntersectionController intersection, AI_CarController car)
    {
        carsCount--;
        RemoveLightListener(heading, car);
        Vector3   waypoint = new Vector3();
        Direction dir      = Direction.Undefined;
        int       compare  = 10;

        foreach (var neighbor in neighbors)
        {
            if (neighbor.Value.carsCount < compare)
            {
                if (NoGoDirection(heading) == neighbor.Key)
                {
                    continue;
                }
                else
                {
                    compare = neighbor.Value.carsCount;
                    dir     = neighbor.Key;
                }
            }
        }
        intersection = neighbors[dir];
        intersection.AddCarToIntersection();
        switch (dir)
        {
        case Direction.North:
            waypoint = intersection.North.position;
            heading  = CarHeading.North;
            break;

        case Direction.South:
            waypoint = intersection.South.position;
            heading  = CarHeading.South;
            break;

        case Direction.East:
            waypoint = intersection.East.position;
            heading  = CarHeading.East;
            break;

        case Direction.West:
            waypoint = intersection.West.position;
            heading  = CarHeading.West;
            break;
        }
        intersection.AddCarToStreetLightEvent(heading, car);
        return(waypoint);
    }