private IEnumerator ShootInVolley(Action onShootEnd, int currentShootNumber = 0) { if (currentShootNumber >= shootVolleyCount) { onShootEnd(); yield break; } transform.LookAt(target.transform); bossCharacter.Shoot(); yield return(new WaitForSeconds(timeBetweenShoot)); StartCoroutine(this.ShootInVolley(onShootEnd, currentShootNumber + 1)); }