private IEnumerator executeActionsCoroutine() { while (!actionQueue.IsEmpty()) { IEnumerator currentAction = actionQueue.DequeueFrontAction(); yield return(StartCoroutine(currentAction)); } characterState = State.IDLE; if (numMovesLeft <= 0 && numActionsLeft <= 0) { characterState = State.FINISHED; } }