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

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

        if (enemy != null)
        {
            enemy.Stun();
        }
    }
예제 #3
0
    virtual protected void Awake()
    {
        _drillsThroughList = new List <string>(_drillsThrough);

        if (_damageDealer == null)
        {
            _damageDealer = GetComponent <DamageDealer_Base>();
        }
        if (_damageDealer != null)
        {
            _damageDealer.Delegate = this;
        }
    }
예제 #4
0
    void OnAttackDeflected(DamageDealer_Base attacker, HealthController_Abstract deflector)
    {
        Actor r = deflector.GetComponent <Actor>();

        if (r == null)
        {
            return;
        }

        if (r.playSoundWhenBlockingAttack)
        {
            PlayDeflectionSound();
        }
    }
예제 #5
0
 void IDamageDealerDelegate.OnInstaKilled(DamageDealer_Base attacker, HealthController_Abstract victim)
 {
 }
예제 #6
0
 void IDamageDealerDelegate.OnDamageDealt(DamageDealer_Base attacker, HealthController_Abstract victim, uint amount)
 {
 }
예제 #7
0
 void IDamageDealerDelegate.OnHitAnInvulnerable(DamageDealer_Base attacker, HealthController_Abstract invulnerable)
 {
     OnAttackDeflected(attacker, invulnerable);
 }
예제 #8
0
 void IDamageDealerDelegate.OnAttackBlocked(DamageDealer_Base attacker, HealthController_Abstract blocker)
 {
     OnAttackDeflected(attacker, blocker);
 }