Routines in non-MonoBehaviour class called from a MonoBehaviour class

Hi everyone!
I’ve come across a problem. I have my little ability class family (which is not that little, and not that simple, but I just show you the important part of it). In my MonoBehaviour script I have a variable abilitySlot, which becomes filled with a specific ability (A, B, C, D, E, or F) when a player meets the requirements to cast one. Then the Update executes it and leaves the variable nullified again. The question is how to introduce over-time effects (read: TypeChannel) for a small group of abilities, if I can’t put anything like StartCoroutine inside typeEffect() (because it’s a member of non-MonoBehaviour class)? The image shows everything extremely simplified of course.

Thanks in advance!

EDIT: Oh, I made a small mistake with naming. “ability” variable in the Update function is meant to be “abilitySlot”.

You’d have to wrap the IEnumerator call in BaseAbility in a coroutine on the player’s MonoBehaviour. The downside is that an ability would need to have some knowledge of its owner.

public class Player : MonoBehaviour
{
    public IEnumerator ExecAbility(IEnumerator ability)
    {
        while (ability.MoveNext())
            yield return ability.Current;
    }
}
public class SomeAbility : BaseAbility
{
    private Player owner;

    public void ExecAbility()
    {
        this.owner.ExecAbility(this.DoAbility());
    }

    public IEnumerator DoAbility()
    {
        // do stuff
        yield return null;
    }
}

This will do the job, at least for now. Thanks!