refactor: renamed behaviour collectors from sorted to ordered

This commit is contained in:
2025-10-11 16:00:47 +03:00
parent 566c16d09c
commit e3d4899112
9 changed files with 22 additions and 32 deletions

View File

@@ -8,7 +8,7 @@ public class LoadContentManager : Behaviour, IFirstFrameUpdate
// We use Ascending order because we are using reverse for loop to call them
private static Comparer<IBehaviour> SortByAscendingPriority() => Comparer<IBehaviour>.Create((x, y) => x.Priority.CompareTo(y.Priority));
private readonly ActiveBehaviourCollectorSorted<ILoadContent> loadContents = new() { SortBy = SortByAscendingPriority() };
private readonly ActiveBehaviourCollectorOrdered<ILoadContent> loadContents = new() { SortBy = SortByAscendingPriority() };
private readonly List<ILoadContent> toCallLoadContents = new(32);
private MonoGameWindowContainer monoGameWindowContainer = null!;

View File

@@ -11,7 +11,7 @@ public class SpriteBatcher : BehaviourBase, IFirstFrameUpdate, IDraw
private ISpriteBatch spriteBatch = null!;
private MonoGameCamera2D camera2D = null!;
private readonly ActiveBehaviourCollectorSorted<IDrawableSprite> drawableSprites = new() { SortBy = SortByPriority() };
private readonly ActiveBehaviourCollectorOrdered<IDrawableSprite> drawableSprites = new() { SortBy = SortByPriority() };
public void FirstActiveFrame()
{

View File

@@ -12,7 +12,7 @@ public class TriangleBatcher : BehaviourBase, ITriangleBatch, IFirstFrameUpdate,
private TriangleBatch triangleBatch = null!;
private MonoGameCamera2D camera2D = null!;
private readonly ActiveBehaviourCollectorSorted<IDrawableTriangle> drawableShapes = new() { SortBy = SortByAscendingPriority() };
private readonly ActiveBehaviourCollectorOrdered<IDrawableTriangle> drawableShapes = new() { SortBy = SortByAscendingPriority() };
public void FirstActiveFrame()
{