Ejemplo n.º 1
0
 //function called by the train model
 public void getStationBeaconInfo(bool pn, double distance, String n, bool left)
 {
     stationPrevToNext = pn;
     if (prevToNext == stationPrevToNext)
     {
         if (left)
         {
             stationSide = 1;
         }
         else
         {
             stationSide = 2;
         }
         distanceToStation = distance + 5;
         stationName       = n;
     }
     approachingStation = true;
     if (mode == 1 && distanceToStation != 0)
     {
         TM.updateAnnouncement("Now arriving at station " + stationName);
     }
 }