feat: added a wip nested coroutine manager

This coroutine manager allows for nested IEnumerators, however it is experimental at the moment.
This commit is contained in:
2026-04-07 18:12:01 +03:00
parent b713fe4f12
commit 6d8ba5c80c
3 changed files with 91 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ namespace Engine.Systems.Tween;
public class TweenManager : Behaviour, IEnterUniverse, IExitUniverse, ITweenManager
{
private CoroutineManager coroutineManager = null!;
private ICoroutineManager coroutineManager = null!;
private readonly Dictionary<ITween, IEnumerator> runningCoroutines = [];
private readonly Queue<Tween> pool = new();
@@ -75,7 +75,7 @@ public class TweenManager : Behaviour, IEnterUniverse, IExitUniverse, ITweenMana
public void EnterUniverse(IUniverse universe)
{
coroutineManager = universe.FindRequiredBehaviour<CoroutineManager>();
coroutineManager = universe.FindRequiredBehaviour<ICoroutineManager>();
}
public void ExitUniverse(IUniverse universe)