Update() публичный Метод

public Update ( ) : void
Результат void
Пример #1
0
 private void Update()
 {
     energy.Update();
     image.fillAmount = energy.GetEnergyNormalized();
     if (image.fillAmount < 0.174)
     {
         image.fillAmount = 0f;
     }
 }
Пример #2
0
    private void Update()
    {
        energy.Update();
        float energyAmount         = energy.GetEnergyNormalized();
        int   energyDisplayAmaount = (int)Math.Round(energyAmount * 100);
        float maxEnergy            = energy.MAX_ENERGY;

        barText.text        = energyDisplayAmaount + " / " + maxEnergy;
        barImage.fillAmount = energyAmount;
    }