using System.Collections.Generic;
namespace Syntriax.Engine.Core.Abstract;
///
/// 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 : IAssignableGameManager, IEnumerable where T : class
{
///
/// Event triggered when an object of type is added to the collector.
///
event OnCollectedEventHandler? OnCollected;
///
/// Event triggered when an object of type is removed from the collector.
///
event OnRemovedEventHandler? OnRemoved;
///
/// Delegate for handling the event.
///
/// The instance of the that triggered the event.
/// The object of type that was added to the collector.
public delegate void OnCollectedEventHandler(BehaviourCollector 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.
public delegate void OnRemovedEventHandler(BehaviourCollector sender, T behaviourRemoved);
}