private void FireBullet()
 {
     if (bulletStockpile.GetBulletCount() >= damage)
     {
         bulletStockpile.IncrementBulletCount(-damage);
         GameObject newBullet = Instantiate(_bulletPrefab, transform.position, Quaternion.identity);
         newBullet.GetComponent <BulletBehavior>().SetDamage(damage);
         timeTillShoot = 1 / rof;
         FireMultishot();
     }
 }
예제 #2
0
 private void Update()
 {
     button.interactable = _bulletStockpile.GetBulletCount() >= _cost;
 }