示例#1
0
 public static void LoadInv(InventoryToSave inventoryToSave, Inventory inventory)
 {
     inventory.currentAmmo                   = inventoryToSave.currentAmmo;
     inventory.ShildCount                    = inventoryToSave.ShildCount;
     inventory.MaxAmmo                       = inventoryToSave.MaxAmmo;
     inventory.MaxMedicineChestCount         = inventoryToSave.MaxMedicineChestCount;
     inventory.medicineChestCount            = inventoryToSave.medicineChestCount;
     inventory.HealingPercentByMedicineChest = inventoryToSave.HealingPercentByMedicineChest;
 }
示例#2
0
    public static InventoryToSave CreateSctructInv(Inventory inventory)
    {
        InventoryToSave inventoryToSave = new InventoryToSave();

        inventoryToSave.HealingPercentByMedicineChest = inventory.HealingPercentByMedicineChest;
        inventoryToSave.MaxAmmo = inventory.MaxAmmo;
        inventoryToSave.MaxMedicineChestCount = inventory.MaxMedicineChestCount;
        inventoryToSave.ShildCount            = inventory.ShildCount;
        inventoryToSave.medicineChestCount    = inventory.medicineChestCount;
        inventoryToSave.currentAmmo           = inventory.currentAmmo;
        return(inventoryToSave);
    }
示例#3
0
    public static InventoryToSave GetInv(PlayerType playerType)
    {
        InventoryToSave stats = new InventoryToSave();

        if (playerType == PlayerType.Egor)
        {
            stats = SaveController.saves[OneSavePanel.SaveNum].InvEgor;
        }
        else if (playerType == PlayerType.Dimitry)
        {
            stats = SaveController.saves[OneSavePanel.SaveNum].InvDima;
        }
        else if (playerType == PlayerType.Maxim)
        {
            stats = SaveController.saves[OneSavePanel.SaveNum].InvMax;
        }
        else if (playerType == PlayerType.Alex)
        {
            stats = SaveController.saves[OneSavePanel.SaveNum].InvAlex;
        }
        return(stats);
    }