Exemple #1
0
 public void RemoveConnection()
 {
     IsConnectedRight = false;
     TempCar          = RightCar.RollingStock;
     RightCar.LeftCar = null;
     RightCar         = null;
     CouplerRight.DestroyCouplerConnection();
     CouplerPointRight.DestroyPointConnection();
 }
Exemple #2
0
 public void InitConnection(RSConnection otherCar)
 {
     IsConnectedRight = true;
     RightCar         = otherCar;
     RightCar.LeftCar = this;
     // this coupler is in connection
     CouplerRight.MakeCouplerConnection();
     CouplerPointRight.MakePointConnection(otherCar);
 }
Exemple #3
0
 public void DestroyConnection()
 {
     CompositionManager.Instance.UpdateCompositionsAfterUncoupling(RightCar.RollingStock);
     IsConnectedRight = false;
     JustUncoupled    = true;
     TempCar          = RightCar.RollingStock;
     tempDist         = TempCar.OwnRun - RollingStock.OwnRun;
     RightCar.LeftCar = null;
     RightCar         = null;
     CouplerRight.DestroyCouplerConnection();
     CouplerPointRight.DestroyPointConnection();
 }
Exemple #4
0
 public void MakeConnection(RSConnection otherCar)
 {
     IsConnectedRight = true;
     RightCar         = otherCar;
     RightCar.LeftCar = this;
     // this coupler is in connection
     CouplerRight.MakeCouplerConnection();
     CouplerPointRight.MakePointConnection(otherCar);
     // make new comp from two
     CompositionManager.Instance.UpdateCompositionsAfterCoupling(RollingStock, RightCar.RollingStock);
     //for coupler indication
     EventManager.CarsCoupled();
 }