Exemple #1
0
        private void Fire(BaseEnemy enemy)
        {
            TowerBullet bullet = BulletPool.GetBullet();

            bullet.FireToEnemy(this, enemy);

            _currentFireCooldown = 1 / _fireSpeed;
            _enableToFire        = false;
        }
Exemple #2
0
 //попадание в цель
 private void HitTarget()
 {
     if (_isTargetAlive)
     {
         _tower.DealDamage(_enemy);
         _enemy.OnDeath -= DeathTarget;
     }
     _isFired = false;
     BulletPool.ReleaseBullet(this);
 }
Exemple #3
0
 private void Awake()
 {
     _instance = this;
     BulletPool.InitPool(_bulletPrefab);
 }