using System; using Syntriax.Engine.Core.Abstract; namespace Syntriax.Engine.Core; public class ActiveBehaviourCollectorSorted : ActiveBehaviourCollector where T : class, IBehaviour { public Comparison? SortBy { get; set; } = null; protected override void OnBehaviourAdd(IBehaviour behaviour) { if (SortBy is not null) activeBehaviours.Sort(SortBy); } public ActiveBehaviourCollectorSorted() { } public ActiveBehaviourCollectorSorted(IGameManager gameManager) : base(gameManager) { } }