public void shootBullet() { if (!hasInfiniteAmmo) { if (canShoot && ammoManager.GetCurrentAmmo() >= 1) { Instantiate(bullet, firePoint.position, firePoint.rotation); canShoot = false; StartCoroutine(Delay()); ammoManager.DecraseAmmo(1); } } else if (canShoot) { Instantiate(bullet, firePoint.position, firePoint.rotation); canShoot = false; StartCoroutine(Delay()); } }