static public void TakeDamage(int damage) { if (health <= 0) { return; } health = health - damage; CurrentHealth.UpdateHealth(); }
// Start is called before the first frame update void Start() { if (ChallengeManager.OneHitDeath) { health = 1; CurrentHealth.UpdateHealth(); } rb = GetComponent <Rigidbody2D>(); wm = GetComponent <WeaponManager>(); }