IEnumerator Shoot(float angle) { bossAnim.SetBool("Shoot", true); yield return(new WaitForSeconds(0.5f)); GameObject fire = Instantiate(fireball, mouth.position, Quaternion.Euler(new Vector3(0, 0, angle))); Fireball fball = fire.GetComponent <Fireball>(); str = 20; def = 20; weak = 2; if (fball != null) { fball.SeekTarget(player.transform, str); } bossAnim.SetBool("Shoot", false); }