public override void Read(AssetReader reader) { base.Read(reader); Center.Read(reader); Radius = reader.ReadSingle(); if (HasSuspensionSpringFirst(reader.Version)) { SuspensionSpring.Read(reader); } SuspensionDistance = reader.ReadSingle(); if (!HasSuspensionSpringFirst(reader.Version)) { SuspensionSpring.Read(reader); } if (HasForceAppPointDistance(reader.Version)) { ForceAppPointDistance = reader.ReadSingle(); } Mass = reader.ReadSingle(); if (HasWheelDampingRate(reader.Version)) { WheelDampingRate = reader.ReadSingle(); } ForwardFriction.Read(reader); SidewaysFriction.Read(reader); if (HasEnabled(reader.Version)) { Enabled = reader.ReadBoolean(); reader.AlignStream(); } }
public override void Read(AssetStream stream) { base.Read(stream); Center.Read(stream); Radius = stream.ReadSingle(); if (IsReadSuspensionSpringFirst(stream.Version)) { SuspensionSpring.Read(stream); } SuspensionDistance = stream.ReadSingle(); if (!IsReadSuspensionSpringFirst(stream.Version)) { SuspensionSpring.Read(stream); } if (IsReadForceAppPointDistance(stream.Version)) { ForceAppPointDistance = stream.ReadSingle(); } Mass = stream.ReadSingle(); if (IsReadWheelDampingRate(stream.Version)) { WheelDampingRate = stream.ReadSingle(); } ForwardFriction.Read(stream); SidewaysFriction.Read(stream); if (IsReadEnabled(stream.Version)) { Enabled = stream.ReadBoolean(); stream.AlignStream(AlignType.Align4); } }