Exemplo n.º 1
0
        //Game Data
        //public int gamesPlayed;
        //public int gamesWon;

        public PlayerData(AdsManager adsManager)
        {
            permanentNoAds   = adsManager.permanentNoAds;
            tempNoAds        = adsManager.tempNoAds;
            tempAdsStartTime = adsManager.tempAdsStartTime;
            adsWatched       = adsManager.adsWatched;
        }
Exemplo n.º 2
0
        public static void SaveAdsInfo(AdsManager adsManager)
        {
            BinaryFormatter formatter = new BinaryFormatter();
            string          path      = Application.persistentDataPath + "/adsData.ads";
            FileStream      stream    = new FileStream(path, FileMode.Create);

            PlayerData data = new PlayerData(adsManager);

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