private void CreateBullet() { countDown = bulletInterval; TankBullet currentBullet = Instantiate(bulletPrefab, bulletSpawner.position, bulletSpawner.rotation, transform.parent); currentBullet.OnScore += CurrentBullet_OnScore; currentBullet.OnDie += CurrentBullet_OnDie; }
private void CurrentBullet_OnDie(TankBullet bullet) { bullet.OnScore -= CurrentBullet_OnScore; bullet.OnDie -= CurrentBullet_OnDie; }