public void SerializeExternalData(object[] Source, ArcenSerializationBuffer Buffer) { //For saving to disk, translate this object into the buffer CivilianCargo data = (CivilianCargo)Source[0]; data.SerializeTo(Buffer); }
// This meanwhile saves the data, assigning it to whatever ParentObject you pass. public static void SetCivilianCargoExt(this GameEntity_Squad ParentObject, CivilianCargo data) { ParentObject.ExternalData.GetCollectionByPatternIndex((int)CivilianCargoExternalData.PatternIndex).Data[0] = data; }
public void DeserializeExternalData(object ParentObject, object[] Target, int ItemsToExpect, ArcenDeserializationBuffer Buffer) { //reverses SerializeData; gets the date out of the buffer and populates the variables Target[0] = new CivilianCargo(Buffer); }
public void InitializeData(object ParentObject, object[] Target) { this.Data = new CivilianCargo(); Target[0] = this.Data; }