Ejemplo n.º 1
0
    public virtual void OnAttacked(DamageSource _damagesource, float _timer = 0.5f)
    {
        if (!B_isHit && !B_isDodging)
        {
            S_last_hit = _damagesource.GetName();
            F_HP      -= (_damagesource.GetDamage() * ((100 - F_defence) / 100)) * ((GetResistanceType() == _damagesource.GetAttackType()) ? 0.9f : 1);
            ResetOnHit(_timer);

            //   Debug.Log("Attacked by: " + S_last_hit);
        }
    }