예제 #1
0
    //END health

    //Thirst

    public void UpdateCurrentThirst(float newCurrentThirst)
    {
        newCurrentThirst = Mathf.Clamp(newCurrentThirst, 0, 100);
        // Debug.Log("Clamped newCurrentThirst: " + newCurrentThirst);
        CurrentThirst = newCurrentThirst;
        mThirstBar.SetBarValue(newCurrentThirst);
    }
예제 #2
0
    public void ThirstIncrease()
    {
        CurrentThirstPoints -= ThirstRate;

        mtThirstBar.SetBarValue(CurrentThirstPoints);

        if (CurrentThirstPoints <= 0)
        {
            CurrentThirstPoints = 0;
            DamageTakenFromThirst(DamageTakenFromThirstValue);
            Debug.Log("Character is suffering from thirst");
        }
        Debug.Log("CurrentThirstPoints: " + CurrentThirstPoints);
    }