Beispiel #1
0
 /// <summary>
 /// Clones values of another <see cref="CarSkin"/>.
 /// </summary>
 /// <param name="other"><see cref="CarSkin"/> to clone.</param>
 public override void CloneValuesFrom(SubPart other)
 {
     if (other is CarSkin skin)
     {
         this.MaterialUsed    = skin.MaterialUsed;
         this.SkinClassKey    = skin.SkinClassKey;
         this.SkinDescription = skin.SkinDescription;
         this.Unknown         = skin.Unknown;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Reads data using <see cref="BinaryReader"/> provided.
 /// </summary>
 /// <param name="br"><see cref="BinaryReader"/> to read data with.</param>
 /// <param name="id">ID of the car this <see cref="CarSkin"/> belongs to.</param>
 /// <param name="index">Index of the <see cref="CarSkin"/>.</param>
 public void Read(BinaryReader br, out int id, out int index)
 {
     id    = br.ReadInt32();
     index = br.ReadInt32();
     this.SkinDescription    = br.ReadNullTermUTF8(0x20);
     this.Unknown            = br.ReadInt32();
     this.MaterialUsed       = br.ReadUInt32().BinString(LookupReturn.EMPTY);
     this.SkinClassKey       = br.ReadEnum <CarSkinClass>();
     br.BaseStream.Position += 0xC;
 }