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(); } }
private void Update() { button.interactable = _bulletStockpile.GetBulletCount() >= _cost; }