Пример #1
0
    private void UpdateHpBar()
    {
        hpBar.value = pointedEntityStats.GetHpFraction();
        Vector2Int hpValues = pointedEntityStats.GetHpValues();

        if (hpValues.x < 0)
        {
            hpValues.x = 0;
        }
        healthNumbers.text = hpValues.x.ToString() + "/" + hpValues.y.ToString();
    }
Пример #2
0
    public void UpdateHpBar()
    {
        hpBar.value = playerStats.GetHpFraction();
        Vector2Int hpValues = playerStats.GetHpValues();

        if (hpValues.x < 0)
        {
            hpValues.x = 0;
        }

        hpText.text = hpValues.x.ToString() + "/" + hpValues.y.ToString();
    }