Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Fire()
- {
- var shot = Instantiate(shotPrefab, firePoint.position, firePoint.rotation);
- var rb = shot.GetComponent<Rigidbody>();
- rb.AddForce(shot.transform.forward * _shotPower, ForceMode.Impulse);
- shot.GetComponent<Shot>().PlayFireSound();
- _player.CurrentAmmo--;
- }
Advertisement
Add Comment
Please, Sign In to add comment