public PersistVehicle(List <object> vehicleData, int id) { VehicleId = id; this.Name = (string)vehicleData[0]; this.IsAlive = (bool)vehicleData[1]; this.Position = new PersistPosition((List <object>)vehicleData[2]); this.Direction = (float)vehicleData[3]; this.Items = PersistItem.LoadFromCargo((List <object>)vehicleData[4]); }
public PersistBox(List <object> boxData, int id) { BoxId = id; this.Name = (string)boxData[0]; this.Items = PersistItem.LoadFromCargo((List <object>)boxData[1]); }