Example #1
0
        private void CreateBullet()
        {
            countDown = bulletInterval;
            TankBullet currentBullet = Instantiate(bulletPrefab, bulletSpawner.position, bulletSpawner.rotation, transform.parent);

            currentBullet.OnScore += CurrentBullet_OnScore;
            currentBullet.OnDie   += CurrentBullet_OnDie;
        }
Example #2
0
 private void CurrentBullet_OnDie(TankBullet bullet)
 {
     bullet.OnScore -= CurrentBullet_OnScore;
     bullet.OnDie   -= CurrentBullet_OnDie;
 }