示例#1
0
 public void DealDamage(IHealth target, float amount)
 {
     if (audioManager)
     {
         audioManager.PlaySFX("Hit");
     }
     target.DeductHealth(amount);
 }
示例#2
0
 public virtual void DealDamage(IHealth enemy, float amount)
 {
     if (audioManager)
     {
         audioManager.PlaySFX("Hit");
     }
     enemy.DeductHealth(amount);
 }
示例#3
0
    public override void DealDamage(IHealth enemy, float amount)
    {
        //Base on Missing HP
        float newAmount = (this.enemy.maxHealth - this.enemy.Health) * amount;

        //Clamp to Minimum Damage
        newAmount = Mathf.Clamp(newAmount, MinimumDamage, newAmount);

        enemy.DeductHealth(newAmount);
        if (audioManager)
        {
            audioManager.PlaySFX("Hit_BackStab");
        }
    }
示例#4
0
 public void DealDamage(IHealth target, float amount)
 {
     target.DeductHealth(amount);
 }
示例#5
0
 public void DealDamage(IHealth target, float amount)
 {
     target.DeductHealth(amount);
     OnDealDamage.Invoke(target, amount);
 }