Beispiel #1
0
        public void SetFromTreeNodes(TreeNode Root)
        {
            Gearboxes = new CarGearBoxesItem[Root.Nodes.Count];

            for (int i = 0; i < Gearboxes.Length; i++)
            {
                TreeNode         ChildNode = Root.Nodes[i];
                CarGearBoxesItem Entry     = (CarGearBoxesItem)ChildNode.Tag;
                Gearboxes[i] = Entry;
            }
        }
Beispiel #2
0
        public void ReadFromFile(BinaryReader reader)
        {
            unk0 = reader.ReadUInt32();
            uint count0 = reader.ReadUInt32();
            uint count1 = reader.ReadUInt32();

            gearboxes = new CarGearBoxesItem[count0];

            for (int i = 0; i < count1; i++)
            {
                CarGearBoxesItem item = new CarGearBoxesItem();
                item.ID                        = reader.ReadInt32();
                item.Description               = StringHelpers.ReadStringBuffer(reader, 32).TrimEnd('\0');
                item.Automatic                 = reader.ReadInt32(); //bool
                item.GearCount                 = reader.ReadInt32();
                item.GearReverseCount          = reader.ReadInt32();
                item.GearRatio0                = reader.ReadSingle();
                item.RotationsGearUp0          = reader.ReadSingle();
                item.RotationsGearDown0        = reader.ReadSingle();
                item.GearRatio1                = reader.ReadSingle();
                item.RotationsGearUp1          = reader.ReadSingle();
                item.RotationsGearDown1        = reader.ReadSingle();
                item.GearRatio2                = reader.ReadSingle();
                item.RotationsGearUp2          = reader.ReadSingle();
                item.RotationsGearDown2        = reader.ReadSingle();
                item.GearRatio3                = reader.ReadSingle();
                item.RotationsGearUp3          = reader.ReadSingle();
                item.RotationsGearDown3        = reader.ReadSingle();
                item.GearRatio4                = reader.ReadSingle();
                item.RotationsGearUp4          = reader.ReadSingle();
                item.RotationsGearDown4        = reader.ReadSingle();
                item.GearRatio5                = reader.ReadSingle();
                item.RotationsGearUp5          = reader.ReadSingle();
                item.RotationsGearDown5        = reader.ReadSingle();
                item.GearRatio6                = reader.ReadSingle();
                item.RotationsGearUp6          = reader.ReadSingle();
                item.RotationsGearDown6        = reader.ReadSingle();
                item.MinClutchGlobal           = reader.ReadSingle();
                item.MinClutchAngleCoeffGlobal = reader.ReadSingle();
                item.ShiftDelayMin             = reader.ReadSingle();
                item.ShiftDelayMax             = reader.ReadSingle();

                gearboxes[i] = item;
            }
        }