Esempio n. 1
0
    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
    }
Esempio n. 2
0
    void IDamageDealerDelegate.OnDamageDealt(DamageDealer_Base attacker, HealthController_Abstract victim, uint amount)
    {
        // TODO

        Enemy enemy = victim.GetComponent <Enemy>();

        if (enemy != null)
        {
            enemy.Stun();
        }
    }
Esempio n. 3
0
    void OnAttackDeflected(DamageDealer_Base attacker, HealthController_Abstract deflector)
    {
        Actor r = deflector.GetComponent <Actor>();

        if (r == null)
        {
            return;
        }

        if (r.playSoundWhenBlockingAttack)
        {
            PlayDeflectionSound();
        }
    }