bool IDamageDealerDelegate.CanAttackBeBlocked(DamageDealer_Base attacker, HealthController_Abstract victim) { Actor r = victim.GetComponent <Actor>(); if (r == null) { return(false); } return(r.CanBlockAttack(woodenShieldBlocks, magicShieldBlocks, MoveDirection)); // TODO: remove the 2 "shieldCanBlock" params }
void IDamageDealerDelegate.OnDamageDealt(DamageDealer_Base attacker, HealthController_Abstract victim, uint amount) { // TODO Enemy enemy = victim.GetComponent <Enemy>(); if (enemy != null) { enemy.Stun(); } }
virtual protected void Awake() { _drillsThroughList = new List <string>(_drillsThrough); if (_damageDealer == null) { _damageDealer = GetComponent <DamageDealer_Base>(); } if (_damageDealer != null) { _damageDealer.Delegate = this; } }
void OnAttackDeflected(DamageDealer_Base attacker, HealthController_Abstract deflector) { Actor r = deflector.GetComponent <Actor>(); if (r == null) { return; } if (r.playSoundWhenBlockingAttack) { PlayDeflectionSound(); } }
void IDamageDealerDelegate.OnInstaKilled(DamageDealer_Base attacker, HealthController_Abstract victim) { }
void IDamageDealerDelegate.OnDamageDealt(DamageDealer_Base attacker, HealthController_Abstract victim, uint amount) { }
void IDamageDealerDelegate.OnHitAnInvulnerable(DamageDealer_Base attacker, HealthController_Abstract invulnerable) { OnAttackDeflected(attacker, invulnerable); }
void IDamageDealerDelegate.OnAttackBlocked(DamageDealer_Base attacker, HealthController_Abstract blocker) { OnAttackDeflected(attacker, blocker); }