public void Shoot(PlayerShooter shooter) { if (GameManager.isRestarting == false && !GameManager.GameIsPaused && !GameManager.playerPauseTheGame) { if (shooter.currentWeapon.FireRate <= 0f) { if (Input.GetButtonDown("Fire1")) { shooter.Shoot(); } } else { if (Input.GetButtonDown("Fire1")) { shooter.ShootRepeating(); } else if (Input.GetButtonUp("Fire1")) { shooter.CancelShoot(); } } } else { shooter.CancelShoot(); } }