void UpdateText()
 {
     if (HealthText != null)
     {
         HealthText.text = Mathf.RoundToInt(HealthModel.GetHealth()) + "/" + Mathf.RoundToInt(HealthModel.GetMaximumHealth());
     }
 }
Esempio n. 2
0
 private void UpdateText() //Sets the text value of the healthbar as a ratio
 {
     HealthText.text = Mathf.RoundToInt(HealthModel.GetHealth()) + "/" +
                       Mathf.RoundToInt(HealthModel.GetMaximumHealth());
 }