protected void BuildFromTable(Dictionary <string, dynamic> t) { mass = (float)t["mass"]; turnMass = (float)t["turnMass"]; dragCoeff = (float)t["dragCoeff"]; float[] c = MtaShared.GetArrayFromTable(t["centerOfMass"], "System.Single"); centerOfMass = new Vector3(c[0], c[1], c[2]); percentSubmerged = (int)t["percentSubmerged"]; tractionMultiplier = (float)t["tractionMultiplier"]; tractionLoss = (float)t["tractionLoss"]; tractionBias = (float)t["tractionBias"]; numberOfGears = (int)t["numberOfGears"]; maxVelocity = (float)t["maxVelocity"]; engineAcceleration = (float)t["engineAcceleration"]; engineInertia = (float)t["engineInertia"]; driveType = (DriveType)Enum.Parse(typeof(DriveType), t["driveType"], true); engineType = (EngineType)Enum.Parse(typeof(EngineType), t["engineType"], true); brakeDeceleration = (float)t["brakeDeceleration"]; brakeBias = (float)t["brakeBias"]; steeringLock = (float)t["steeringLock"]; suspensionForceLevel = (float)t["suspensionForceLevel"]; suspensionDamping = (float)t["suspensionDamping"]; suspensionHighSpeedDamping = (float)t["suspensionHighSpeedDamping"]; suspensionUpperLimit = (float)t["suspensionUpperLimit"]; suspensionLowerLimit = (float)t["suspensionLowerLimit"]; suspensionFrontRearBias = (float)t["suspensionFrontRearBias"]; suspensionAntiDiveMultiplier = (float)t["suspensionAntiDiveMultiplier"]; seatOffsetDistance = (float)t["seatOffsetDistance"]; collisionDamageMultiplier = (float)t["collisionDamageMultiplier"]; monetary = (int)t["monetary"]; modelFlags = (uint)t["modelFlags"]; handlingFlags = (uint)t["handlingFlags"]; headLight = (VehicleLightType)Enum.Parse(typeof(VehicleLightType), t["headLight"], true); tailLight = (VehicleLightType)Enum.Parse(typeof(VehicleLightType), t["tailLight"], true); animGroup = (int)t["animGroup"]; }
public VehicleLightBuilder SetType(VehicleLightType type) { Type = type; return(this); }
public void SetType(VehicleLightType type) { Type = type; }