void LoadData(Stream stream, int index)
{
if (stream != null)
{
try
{
List<PlayerShip> ships = new List<PlayerShip>();
using (MemoryStream dataStream = stream.GetMemoryStream(index))
{
int position = 0;
do
{
PlayerShip p = new PlayerShip(dataStream, position);
ships.Add(p);
position += p.Length;
} while (position < dataStream.Length);
}
Ships = new ReadOnlyCollection<PlayerShip>(ships);
}
catch (Exception ex)
{
errors.Add(ex);
}
}
}
//public byte[] GetBytes()