Ejemplo n.º 1
0
 void doDamage()
 {
     if (turretDamage != null)
     {
         turretDamage.OnTurretHit(turret, damagePerTick, enemyDamageHandler);
     }
 }
Ejemplo n.º 2
0
 protected void damageEnemy(Collider enemy)
 {
     turretDamageable = enemy.GetComponent <ITurretDamage>();
     if (turretDamageable != null)
     {
         turretDamageable.OnTurretHit(turret, (int)turretStats.SearchStatValue(StatType.DAMAGE), enemyDamageHandler);
     }
 }
Ejemplo n.º 3
0
    void doDamage()
    {
        if (ReferenceEquals(targetDetection, null))
        {
            return;
        }

        foreach (Transform target in targetDetection.CurrentTargets)
        {
            ITurretDamage turretDamageable = target.GetComponent <ITurretDamage>();
            if (turretDamageable != null)
            {
                turretDamageable.OnTurretHit(transform.parent, damagePerTick, enemyDamageHandler);
            }
        }
    }
Ejemplo n.º 4
0
    void doDamage()
    {
        if (ReferenceEquals(targetDetection, null))
        {
            return;
        }
        playParticles();
        playSound();

        int damage = (int)turretStats.GetStatValue(StatType.DAMAGE);

        foreach (Transform target in targetDetection.CurrentTargets)
        {
            ITurretDamage turretDamageable = target.GetComponent <ITurretDamage>();
            if (turretDamageable != null)
            {
                turretDamageable.OnTurretHit(transform, damage, enemyDamageHandler);
            }
        }
        timer = 0f;
    }