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, T> OnCollected { get; }
///
/// Event triggered when an object of type is removed from the collector.
///
Event, T> 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.
delegate void CollectedEventHandler(IBehaviourCollector sender, T behaviourCollected);
///
/// Delegate for handling the event.
///
/// The instance of the that triggered the event.
/// The object of type that was removed from the collector.
delegate void RemovedEventHandler(IBehaviourCollector sender, T behaviourRemoved);
}