private void ApplyDamage(float damage) { health -= damage; if (healthbar != null) { healthbar.SetHealth(health); } if (health <= 0) { healthbar.Hide(); } }