private void Shoot() { if (Input.GetButtonDown("Fire1")) { shooter.ContinueFiring(true); shootingCoroutine = StartCoroutine(shooter.Fire()); } if (Input.GetButtonUp("Fire1")) { shooter.ContinueFiring(false); StopCoroutine(shootingCoroutine); } }