Beispiel #1
0
 public void TakeDamage(float damage, float multiplier)
 {
     health             = Mathf.Clamp(health - (damage * multiplier), 0, maxHealth);
     damageMultiplier  += 0.5f;
     healthSlider.value = health;
     if (health <= 0)
     {
         OnDeath();
     }
     StartCoroutine(tookHitAnimation());
     mainCameraSound.PlayHitSound();
     print("takedamage " + this.health + " " + this.healthSlider.value);
 }