public void Deserialize(NetDataReader reader) { Path = new PathString(); Path.Deserialize(reader); Ship = new Spaceship(); Ship.Deserialize(reader); }
public void Deserialize(NetDataReader reader) { Originator = reader.GetString(64); OriginatorAreaGain = reader.GetDouble(); int infoCount = reader.GetInt(); ShipsInfo = Enumerable.Range(0, infoCount).Select((i) => { Spaceship ship = new Spaceship(); ship.Deserialize(reader); return(new ShipInfo() { Ship = ship, Damage = reader.GetDouble(), }); }).ToList(); }
public Program() { try { Runtime.UpdateFrequency = UpdateFrequency.Update10; spaceship = new Spaceship(GridTerminalSystem, IGC); if (Storage.Length > 0) { using (var ms = new MemoryStream(Storage)) { int storage_ver; ms.ReadInt(out storage_ver); if (storage_ver == Settings.STORAGE_VER) { spaceship.Deserialize(ms); } } } } catch (Exception ex) { spaceship.debug.WriteText(ex.ToString(), true); } }
public void Deserialize(NetDataReader reader) { Ship = new Spaceship(); Ship.Deserialize(reader); }