Exemple #1
0
    private void Update()
    {
        if (isSprinting)
        {
            energySystem.DrainEnergyOverTime(sprintDrainSpeed);
        }
        else
        {
            energySystem.RegenEnergyOverTime(energyRegenSpeed);
        }

        playerMovement.HasEnergy = energySystem.GetEnergyPercent() != 0;
    }
Exemple #2
0
 private void Update()
 {
     SetBarFillAmount(energySystem.GetEnergyPercent());
 }