public void damage(int damage) { if (armor <= 0) { health -= damage; SC.UpdateHealth(health); } else { armor -= damage; SC.UpdateArmor(armor); } if (health < 0) { Destroy(gameObject); } }