IEnumerator WaitCoroutine() { yield return(new WaitForSeconds(attackDelay)); theAudio.Play(atkSound); if (NearPlayer()) { thePlayerStat.Hit(GetComponent <Enemy_Stat>().atk); } attaking = false; }