/// <summary> /// 적 캐릭터 HP가 0이 되면 /// 잠시 후 비활성화 시킨다 /// </summary> /// <returns></returns> private IEnumerator EnemyDis() { GetComponent <CapsuleCollider>().enabled = false; //콜라이더를 끈다 EnemyCtrl enemy = GetComponent <EnemyCtrl>(); enemy.EnableObj(); yield return(new WaitForSeconds(3f)); //Boss 캐릭터이면 BossUi ui = GetComponent <BossUi>(); if (ui != null) { ui.UiOff(); } gameObject.SetActive(false); }