public IEnumerator Fire_Bullet(Vector3 position) { for (int i = 0; i < 10; i++) { GameObject obj = GameManager.Instance.objectPooler.GetPooledObject((int)GameManager.OBJECTPOOLER.nBoss_Bullet); if (obj == null) { yield return(null); } Boss_Bullet bullet = obj.GetComponent <Boss_Bullet>(); bullet.m_Target = m_Target.position; obj.transform.position = new Vector3(position.x + 3.0f * Mathf.Cos(Mathf.Deg2Rad * (180.0f - (i * 20.0f))), position.y + 3.0f * Mathf.Sin(Mathf.Deg2Rad * (180.0f - (i * 20.0f))), -11.0f); obj.SetActive(true); yield return(new WaitForSeconds(0.1f)); } m_Animator.SetBool("IsAttack", false); }
public IEnumerator Fire_Bullet() { GameObject obj = GameManager.Instance.objectPooler.GetPooledObject((int)GameManager.OBJECTPOOLER.nAngel_Bullet); if (obj == null) { yield return(null); } m_Animator.SetBool("IsAttack", true); Boss_Bullet bullet = obj.GetComponent <Boss_Bullet>(); bullet.m_Target = m_Target.position; obj.transform.position = gameObject.transform.position + new Vector3(0.0f, 1.5f, 0.0f); obj.SetActive(true); m_Time = 0.0f; yield return(new WaitForSeconds(bullet.m_DelayTime)); m_Animator.SetBool("IsAttack", false); }