Example #1
0
 /// <summary>
 /// At junction, this method is called to determine
 /// the direction to which a train proceeds.
 /// </summary>
 public abstract JunctionRoute onJunction(Train train, JunctionRailRoad railRoad);
Example #2
0
 /// <summary>
 /// This method is called when a train hits the stop position
 /// of a platform (or other train harbors.)
 /// </summary>
 /// <param name="callCount">
 /// This value is 0 when this method is called
 /// first time (when a train stops at a station.)
 /// After the given time is elapsed, the onStop method will be
 /// called again but this time with callCount==1. The value
 /// keeps increasing as this process repeats.
 /// </param>
 /// <returns>
 /// returns the amount of time the train should stop.
 /// after this time span, the train will call this same method
 /// so the train controller still has a chance to postpone the
 /// departure. Return 0 to make the train proceed, or return
 /// -1 to make the train turn around.
 ///
 /// Returning 0 when callCount==0 means the train will not stop
 /// at the specified platform.
 /// </returns>
 public abstract TimeLength getStopTimeSpan(Train train, TrainHarbor platform, int callCount);
Example #3
0
 public virtual TimeLength getStopTimeSpan(Train tr, int callCount)
 {
     return(TimeLength.ZERO);
 }