Ejemplo n.º 1
0
    public void ActivateRengenerating(int regenCount)
    {
        if (HealIsReady && StatCtrl.Hp < StatCtrl.MaxHp)
        {
            AllData.AllSlotsItems[41].Quantity -= 1;
            UiCtrl.UpdateHealBtn();

            AllData.StaticFieldsCleanup();
            AllData.CleanupEmptySlots();
            AllData.Refresh();

            StatCtrl.AddHp((int)(regenCount + (regenCount * PlusHealPercent)));
            HealIsReady       = false;
            HealTimeBeforeEnd = 0;

            InventoryItems.SendChangeInventory(AllData.AllSlotsItems);

            if (gameObject.tag == "Player")
            {
                AudioUiCtrl.EatPlay();
            }
        }
    }