Ejemplo n.º 1
0
        public void SavePlayerData()
        {
            AddUnitsToTotal();
            for (int i = 0; i < Data.Weapons.Count; i++)
            {
                for (int j = 0; j < Weapons.Count; j++)
                {
                    Debug.Log("OUT: Data" + Data.Weapons[i].WeaponName + "Weapons" + Weapons[j].WeaponName);

                    if (Data.Weapons[i].WeaponName == Weapons[j].WeaponName)
                    {
                        Debug.Log("IN: Data" + Data.Weapons[i].WeaponName + "Weapons" + Weapons[j].WeaponName);
                        Data.Weapons.RemoveAt(i);
                        Data.Weapons.Add(Weapons[i].RWeaponData);
                    }
                }
            }
            SaveLoad.Save <PlayerData>(Data, "PlayerData.sav");
        }
Ejemplo n.º 2
0
 public void SaveWeapons()
 {
     Data.Weapons = Weapons.Values.ToList();
     SaveLoad.Save(Data, "PlayerData.sav");
 }
Ejemplo n.º 3
0
 public void SaveUnlockedItems()
 {
     SaveLoad.Save(ShopItemsUnlocked, "ShopItemsUnlocked.sav");
     SaveLoad.Save(Data, "PlayerData.sav");
 }