private void OnValueChanged()
 {
     if (hpBar != null)
     {
         hpBar.SetValue(currentValue);
     }
     onValueChanged.Invoke();
     if (minimumReached)
     {
         CancelInvoke("isNoMoreUnderAttack");
         isUnderAttack = false;
         onMinimumReached.Invoke();
         if (hpBar != null)
         {
             hpBar.DisableBar();
             hpBar = null;
         }
     }
 }