void Start() { currentAmmo = magazineSize; originalCameraY = playerCamera.transform.localEulerAngles.x; }
Would you like a version of this script for or Godot GDScript instead? Just ask.
// Shooting if (Input.GetButton("Fire1") && Time.time >= nextTimeToFire && currentAmmo > 0) { nextTimeToFire = Time.time + 60f / fireRate; Shoot(); }
void Start() { currentAmmo = magazineSize; originalCameraY = playerCamera.transform.localEulerAngles.x; }
Would you like a version of this script for or Godot GDScript instead? Just ask.
// Shooting if (Input.GetButton("Fire1") && Time.time >= nextTimeToFire && currentAmmo > 0) { nextTimeToFire = Time.time + 60f / fireRate; Shoot(); }