public override void Trigger(int Direction, EventTriggerType TriggerType, AbstractTrain Train, AbstractCar Car) { if (TriggerType == EventTriggerType.FrontCarFrontAxle) { RequestStop stop; //Temp probability value if (Early.Time != -1 && CurrentRoute.SecondsSinceMidnight < Early.Time) { stop = Early; } else if (Early.Time != -1 && CurrentRoute.SecondsSinceMidnight > Early.Time && Late.Time != -1 && CurrentRoute.SecondsSinceMidnight < Late.Time) { stop = OnTime; } else if (Late.Time != -1 && CurrentRoute.SecondsSinceMidnight > Late.Time) { stop = Late; } else { stop = OnTime; } stop.MaxCars = MaxCars; stop.StationIndex = StationIndex; stop.FullSpeed = FullSpeed; if (Direction > 0) { Train.RequestStop(stop); } } }
public override void Trigger(int Direction, EventTriggerType TriggerType, AbstractTrain Train, AbstractCar Car) { if (TriggerType == EventTriggerType.FrontCarFrontAxle) { RequestStop stop; //Temp probability value if (early.Time != -1 && currentRoute.SecondsSinceMidnight < early.Time) { stop = early; } else if (early.Time != -1 && currentRoute.SecondsSinceMidnight > early.Time && late.Time != -1 && currentRoute.SecondsSinceMidnight < late.Time) { stop = onTime; } else if (late.Time != -1 && currentRoute.SecondsSinceMidnight > late.Time) { stop = late; } else { stop = onTime; } stop.MaxCars = maxCars; stop.StationIndex = stationIndex; stop.FullSpeed = fullSpeed; if (Direction > 0) { Train.RequestStop(stop); } } }