public void NextStop() { BusStopPoint busStop; PointF oldDestination = _destination; _busStopIndex = _busLine.GetNextStopIndex(_busStopIndex); _pointIndex = 1; busStop = _busLine.GetCurrentStop(_busStopIndex).GetCurrentPoint(_pointIndex); _isVertical = busStop.isVertical; _destination = busStop.location; CalculateMovementSpeed(_busLine.GetCurrentStop(_busStopIndex).GetThisPointDurationInPercent(_pointIndex), oldDestination); }
public Bus(BusLine busLine, int currentStop = 1) : base(busLine.GetCurrentStop(currentStop).GetLastPoint().location, GlobalVariables.bus_Size, GlobalVariables.BUS_MAX_PERSON, GlobalVariables.bus_Pen) { _busLine = busLine; _busStopIndex = currentStop; _pointIndex = 0; _isVertical = false; }