示例#1
0
 public void Deserialize(NetDataReader reader)
 {
     Path = new PathString();
     Path.Deserialize(reader);
     Ship = new Spaceship();
     Ship.Deserialize(reader);
 }
示例#2
0
        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();
        }
示例#3
0
 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);
     }
 }
示例#4
0
 public void Deserialize(NetDataReader reader)
 {
     Ship = new Spaceship();
     Ship.Deserialize(reader);
 }