Exemple #1
0
        public virtual object Clone()
        {
            Car car = (Car)MemberwiseClone();

            car.FrontBogie  = (Bogie)FrontBogie.Clone();
            car.RearBogie   = (Bogie)RearBogie.Clone();
            car.Performance = (Performance)Performance.Clone();
            car.Delay       = (Delay)Delay.Clone();
            car.Move        = (Move)Move.Clone();
            car.Brake       = (Brake)Brake.Clone();
            car.Pressure    = (Pressure)Pressure.Clone();
            return(car);
        }
Exemple #2
0
 internal Car()
 {
     Mass   = 40.0;
     Length = 20.0;
     Width  = 2.6;
     Height = 3.2;
     CenterOfGravityHeight = 1.5;
     DefinedAxles          = false;
     FrontAxle             = 8.0;
     RearAxle             = -8.0;
     FrontBogie           = new Bogie();
     RearBogie            = new Bogie();
     ExposedFrontalArea   = 5.0;
     UnexposedFrontalArea = 1.6;
     Performance          = new Performance();
     Delay       = new Delay();
     Move        = new Move();
     Brake       = new Brake();
     Pressure    = new Pressure();
     Reversed    = false;
     Object      = string.Empty;
     LoadingSway = false;
 }