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"); }
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 (); }