Пример #1
0
    public void PlayerHPLose()
    {
        var go = new PlayerUtils();

        go.HPRemove(50);
        Assert.AreEqual(50, go.getHealth());
    }
Пример #2
0
    public void PlayerHPGain()
    {
        var go = new PlayerUtils();

        go.HPRemove(50);
        go.HPGrant(25);
        Assert.AreEqual(75, go.getHealth());
    }
Пример #3
0
 public void loseHP(float amount)
 {
     playUtils.HPRemove(amount);
     HPChange           = 2;
     healthSlider.value = playUtils.getHealth();
     rb.velocity       *= -1;
     if (playUtils.getHealth() <= 0 && !isDead)
     {
         Death();
     }
 }