namespace Syntriax.Engine.Core; /// /// Represents a collector for the class type of . /// Provides mechanisms for tracking additions and removals, and notifies subscribers when such events occur on the assigned . /// /// The type of objects tracked by the collector. public interface IBehaviourCollector : IHasUniverse where T : class { /// /// Event triggered when an object of type is added to the collector. /// Event, BehaviourCollectedArguments> OnCollected { get; } /// /// Event triggered when an object of type is removed from the collector. /// Event, BehaviourRemovedArguments> OnRemoved { get; } /// /// Amount of collected. /// int Count { get; } /// /// Get a collected by it's index. /// T this[System.Index index] { get; } /// /// Delegate for handling the event. /// /// The instance of the that triggered the event. /// The object of type that was added to the collector. readonly record struct BehaviourCollectedArguments(T BehaviourCollected); /// /// Delegate for handling the event. /// /// The object of type that was removed from the collector. readonly record struct BehaviourRemovedArguments(T BehaviourRemoved); }