Esempio n. 1
0
 public PlayerData(MyCities city)
 {
     cityID   = city.cityID;
     cityName = city.cityName;
     cityPop  = city.cityPop;
     cityArea = city.cityArea;
 }
Esempio n. 2
0
        public static void SaveMyCities(MyCities city)
        {
            BinaryFormatter formatter = new BinaryFormatter();
            string          path      = "D:/mycities.save";
            FileStream      stream    = new FileStream(path, FileMode.Create);

            PlayerData data = new PlayerData(city);

            formatter.Serialize(stream, data);
            stream.Close();
        }