Esempio n. 1
0
        public static void SaveEconomy(EconomyManager eco)
        {
            BinaryFormatter formatter = new BinaryFormatter();
            string          path      = Application.persistentDataPath + "/economy.save";
            FileStream      stream    = new FileStream(path, FileMode.Create);

            EconomyData data = new EconomyData(eco);

            formatter.Serialize(stream, data);
            stream.Close();
        }
Esempio n. 2
0
 public EconomyData(EconomyManager eco)
 {
     money         = eco.totalMoney;
     expense       = eco.totalExpense;
     totalMonsters = eco.totalMonsters;
 }