refactor: switched from universe objects to behaviours on all managers like update, draw & physics etc.

This commit is contained in:
2025-06-03 23:59:40 +03:00
parent 24d1a1d764
commit beecefec1c
6 changed files with 23 additions and 23 deletions

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace Syntriax.Engine.Core;
public class CoroutineManager : UniverseObject
public class CoroutineManager : Behaviour
{
private readonly List<IEnumerator> enumerators = [];
@@ -18,12 +18,12 @@ public class CoroutineManager : UniverseObject
enumerators.Remove(enumerator);
}
protected override void OnEnteringUniverse(IUniverse universe)
protected override void OnEnteredUniverse(IUniverse universe)
{
universe.OnUpdate.AddListener(OnUpdate);
}
protected override void OnExitingUniverse(IUniverse universe)
protected override void OnExitedUniverse(IUniverse universe)
{
universe.OnUpdate.RemoveListener(OnUpdate);
}