Exemplo n.º 1
0
 public FreightAnimations(FreightAnimations copyFACollection, MSTSWagon wagon)
 {
     foreach (FreightAnimation freightAnim in copyFACollection.Animations)
     {
         if (freightAnim is FreightAnimationContinuous)
         {
             Animations.Add(new FreightAnimationContinuous(freightAnim as FreightAnimationContinuous, wagon));
             if ((Animations.Last() as FreightAnimationContinuous).FullAtStart)
             {
                 LoadedOne = Animations.Last() as FreightAnimationContinuous;
             }
         }
         else if (freightAnim is FreightAnimationStatic)
         {
             Animations.Add(new FreightAnimationStatic(freightAnim as FreightAnimationStatic));
         }
         else if (freightAnim is FreightAnimationDiscrete)
         {
             Animations.Add(new FreightAnimationDiscrete(freightAnim as FreightAnimationDiscrete));
         }
     }
     FreightWeight          = copyFACollection.FreightWeight;
     FreightType            = copyFACollection.FreightType;
     MSTSFreightAnimEnabled = copyFACollection.MSTSFreightAnimEnabled;
     WagonEmptyWeight       = copyFACollection.WagonEmptyWeight;
     LoadingStartDelay      = copyFACollection.LoadingStartDelay;
     UnloadingStartDelay    = copyFACollection.UnloadingStartDelay;
     IsGondola = copyFACollection.IsGondola;
 }
Exemplo n.º 2
0
        public FreightAnimations(FreightAnimations copyFACollection, MSTSWagon wagon)
        {
            foreach (FreightAnimation freightAnim in copyFACollection.Animations)
            {
                if (freightAnim is FreightAnimationContinuous)
                {
                    Animations.Add(new FreightAnimationContinuous(freightAnim as FreightAnimationContinuous, wagon));
                    if ((Animations.Last() as FreightAnimationContinuous).FullAtStart)
                    {
                        LoadedOne = Animations.Last() as FreightAnimationContinuous;
                    }
                }
                else if (freightAnim is FreightAnimationStatic)
                {
                    Animations.Add(new FreightAnimationStatic(freightAnim as FreightAnimationStatic));
                }
                else if (freightAnim is FreightAnimationDiscrete)
                {
                    Animations.Add(new FreightAnimationDiscrete(freightAnim as FreightAnimationDiscrete));
                }
            }
            FreightWeight          = copyFACollection.FreightWeight;
            FreightType            = copyFACollection.FreightType;
            MSTSFreightAnimEnabled = copyFACollection.MSTSFreightAnimEnabled;
            WagonEmptyWeight       = copyFACollection.WagonEmptyWeight;
            LoadingStartDelay      = copyFACollection.LoadingStartDelay;
            UnloadingStartDelay    = copyFACollection.UnloadingStartDelay;
            IsGondola = copyFACollection.IsGondola;

            // additions to manage consequences of variable weight on friction and brake forces
            EmptyORTSDavis_A                   = copyFACollection.EmptyORTSDavis_A;
            EmptyORTSDavis_B                   = copyFACollection.EmptyORTSDavis_B;
            EmptyORTSDavis_C                   = copyFACollection.EmptyORTSDavis_C;
            EmptyORTSWagonFrontalAreaM2        = copyFACollection.EmptyORTSWagonFrontalAreaM2;
            EmptyORTSDavisDragConstant         = copyFACollection.EmptyORTSDavisDragConstant;
            EmptyMaxBrakeForceN                = copyFACollection.EmptyMaxBrakeForceN;
            EmptyMaxHandbrakeForceN            = copyFACollection.EmptyMaxHandbrakeForceN;
            EmptyCentreOfGravityM_Y            = copyFACollection.EmptyCentreOfGravityM_Y;
            ContinuousFreightAnimationsPresent = copyFACollection.ContinuousFreightAnimationsPresent;
            StaticFreightAnimationsPresent     = copyFACollection.StaticFreightAnimationsPresent;
        }