private void Update() { if (isSprinting) { energySystem.DrainEnergyOverTime(sprintDrainSpeed); } else { energySystem.RegenEnergyOverTime(energyRegenSpeed); } playerMovement.HasEnergy = energySystem.GetEnergyPercent() != 0; }
private void Update() { SetBarFillAmount(energySystem.GetEnergyPercent()); }