Example #1
0
        public void LoadPlayer()
        {
            SaveSystem.Load();
            PlayerData       data  = SaveSystem.loadedData.playerData;
            EnchancementData edata = SaveSystem.loadedData.enchancementData;

            products = data.products;

            money      = data.money;
            sellAmount = data.sellAmount;

            autoClickSave = data.autoClicker;
            autoSellSave  = data.autoSeller;

            AutoClicker.autoClick = data.robots;
            AutoSeller.autoClick  = data.sellers;

            ClickerButton.cost         = data.clickerCost;
            ClickerButton.costIncrease = data.clickerCostIncrease;

            SellerButton.cost         = data.sellerCost;
            SellerButton.costIncrease = data.sellerCostIncrease;

            xp    = data.playerXP;
            level = data.playerLevel;

            foreach (EnhancementButton btn in FindObjectsOfType <EnhancementButton>())
            {
                btn.enhancement = edata.enhancementData[btn.name];
            }
        }
Example #2
0
 public SaveSystemData()
 {
     playerData       = new PlayerData();
     enchancementData = new EnchancementData();
 }