//END health //Thirst public void UpdateCurrentThirst(float newCurrentThirst) { newCurrentThirst = Mathf.Clamp(newCurrentThirst, 0, 100); // Debug.Log("Clamped newCurrentThirst: " + newCurrentThirst); CurrentThirst = newCurrentThirst; mThirstBar.SetBarValue(newCurrentThirst); }
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); }