Пример #1
0
		private static void Save() {

			Medals medals = new Medals ();
			medals.bronzes = totalBronze;
			medals.silvers = totalSilver;
			medals.golds = totalGold;
			medals.platinum = totalPlatinum;
			medals.obsidiam = totalObsidiam;

			MemoryCard.Save (medals,"medals");
		}
Пример #2
0
        private static void Save()
        {
            BinaryFormatter bf = new BinaryFormatter ();
            FileStream file = File.Create (Application.persistentDataPath + "/medals.dat");

            Medals medals = new Medals ();
            medals.bronzes = totalBronze;
            medals.silvers = totalSilver;
            medals.golds = totalGold;
            medals.platinum = totalPlatinum;
            medals.obsidiam = totalObsidiam;

            bf.Serialize (file, medals);
            file.Close ();
        }