Exemplo n.º 1
0
 void OnEnable()
 {
     if (hitpoints != null)
     {
         gameObject.SetActive(hitpoints.gameObject.activeSelf);
         if (fillBar != null)
         {
             SetProgress(hitpoints.GetRemainingHealthPercentage());
         }
     }
 }
Exemplo n.º 2
0
 public void OnDamage(Hitpoints hitpoints)
 {
     img.fillAmount = hitpoints.GetRemainingHealthPercentage() / 100;
 }
Exemplo n.º 3
0
 public void OnDamage(Hitpoints hitpoints)
 {
     img.fillAmount = hitpoints.GetRemainingHealthPercentage () / 100;
 }