public void AddThirst(float modifier) { thirst += modifier; thirst = Mathf.Clamp01(thirst); UIThirst.GetComponent <Slider>().value = thirst; if (carried && modifier < 0) { thirst += modifier; thirst = Mathf.Clamp01(thirst); UIThirst.GetComponent <Slider>().value = thirst; } if (carrying && modifier < 0) { thirst -= modifier / 2; thirst = Mathf.Clamp01(thirst); UIThirst.GetComponent <Slider>().value = thirst; } }
public void AddThirst(float modifier) { thirst += modifier; thirst = Mathf.Clamp01(thirst); UIThirst.GetComponent <Slider>().value = thirst; }