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

            bullet.FireToEnemy(this, enemy);

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