Пример #1
0
    /// <summary>
    /// Takes the item and updates all player stats, also updates the healthbar.
    /// </summary>
    public void TakeItem()
    {
        healthKit.SetHealthKitValue(itemProfile.healthKitToAdd);
        player.attackController.ModifyBaseDamage(itemProfile.damageToAdd);
        if (healthBarUI)
        {
            healthBarUI.UpdatePlayerHealthBar();
        }

        if (healthKitBar)
        {
            healthKitBar.UpdateHealthKitValue();
        }

        OnItemTaked.Invoke();
    }