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