IEnumerator EnemyThinkingRoutine(float pauseDuration) { Debug.Log("Enemy thinking..."); yield return(new WaitForSeconds(pauseDuration)); int rand = UnityEngine.Random.Range(0, 2); Transform randomCard = EnemyArea.transform.GetChild(rand); randomCard.transform.SetParent(dropZone.transform, false); AudioHelper.PlayClip2D(endDragSound, 1f); Debug.Log("Enemy performs action"); yield return(new WaitForSeconds(pauseDuration)); _dropZone.Discard(); EnemyTurnEnded?.Invoke(); playerCover.gameObject.SetActive(false); //turn over. Go back to Player. StateMachine.ChangeState <PlayerTurnCardGameState>(); }