public void PlayerHPLose() { var go = new PlayerUtils(); go.HPRemove(50); Assert.AreEqual(50, go.getHealth()); }
public void PlayerHPGain() { var go = new PlayerUtils(); go.HPRemove(50); go.HPGrant(25); Assert.AreEqual(75, go.getHealth()); }
public void loseHP(float amount) { playUtils.HPRemove(amount); HPChange = 2; healthSlider.value = playUtils.getHealth(); rb.velocity *= -1; if (playUtils.getHealth() <= 0 && !isDead) { Death(); } }