Hi all,
I am using a slider to display a players current stamina. Very basic issue I am having here -
Why does this code:
if(currentStamina >= 0)
{
currentStamina += Time.deltaTime * 2f;
}
cause the UISlider to refill faster than this code:
if(currentStamina >= 0)
{
currentStamina += Time.deltaTime * staminaRegenRate;
}
even when staminaRegenRate is declared as a public float with a value of 2f? Also, where should I be making the statement:
staminaBar.value = currentStamina;
Currently I have it at the bottom of Update().
Thanks!