Ejemplo n.º 1
0
        protected override void Shoot()
        {
            EnemyBullet bullet = Pool <EnemyBullet> .Instance.RequestObject();

            if (bullet == null)
            {
                return;
            }

            bullet.transform.position = bulletSpawnPoint.position;
            bullet.transform.rotation = bulletSpawnPoint.rotation;
            bullet.Damage             = Damage;
            bullet.gameObject.SetActive(true);

            if (sfx?.clip != null)
            {
                sfx.Play();
            }
        }
Ejemplo n.º 2
0
 protected virtual void Shoot()
 {
     sfx.Play();
     lastBullet        = Instantiate(bullet, bulletSpawnPoint.position, bulletSpawnPoint.rotation);
     lastBullet.Damage = Damage;
 }