Example #1
0
 /// <summary>
 /// Reads data from stream into this <see cref="CustomCP"/>.
 /// </summary>
 /// <param name="br"><see cref="BinaryReader"/> to read with.</param>
 public void Read(BinaryReader br)
 {
     this.Name       = br.ReadNullTermUTF8();
     this.Key        = br.ReadUInt32();
     this.AttribType = br.ReadEnum <CarPartAttribType>();
 }
Example #2
0
 /// <summary>
 /// Converts this <see cref="CPAttribute"/> to an attribute of type provided.
 /// </summary>
 /// <param name="type">Type of a new attribute.</param>
 /// <returns>New <see cref="CPAttribute"/>.</returns>
 public abstract CPAttribute ConvertTo(CarPartAttribType type);
Example #3
0
 /// <summary>
 /// Constructor for <see cref="CustomCP"/>.
 /// </summary>
 /// <param name="key">Key of this <see cref="CustomCP"/>.</param>
 public CustomCP(uint key)
 {
     this.Key        = key;
     this.Name       = key.BinString(LookupReturn.EMPTY);
     this.AttribType = CarPartAttribType.Integer;
 }