Пример #1
0
        public void SetDrag(PartModule pm, DragValue DMaxMin)
        {
            ModifyingModules[pm] = DMaxMin;

            float Max = maximum_drag;
            float Min = minimum_drag;

            foreach (KeyValuePair<PartModule, DragValue> pair in ModifyingModules) {
                Max += pair.Value.maximum_drag;
                Min += pair.Value.minimum_drag;
            }

            part.maximum_drag = Max < 0 ? 0 : Max;
            part.minimum_drag = Min < 0 ? 0 : Min;
        }
Пример #2
0
        public void SetDrag(PartModule pm, DragValue DMaxMin)
        {
            ModifyingModules[pm] = DMaxMin;

            float Max = maximum_drag;
            float Min = minimum_drag;

            foreach (KeyValuePair <PartModule, DragValue> pair in ModifyingModules)
            {
                Max += pair.Value.maximum_drag;
                Min += pair.Value.minimum_drag;
            }

            part.maximum_drag = Max < 0 ? 0 : Max;
            part.minimum_drag = Min < 0 ? 0 : Min;
        }