This commit is contained in:
2025-05-30 16:05:49 +03:00
committed by Syntriax
parent 846aa75dd5
commit b5140a94de
57 changed files with 437 additions and 462 deletions

View File

@@ -10,12 +10,12 @@ public interface IBehaviourCollector<T> : IHasUniverse where T : class
/// <summary>
/// Event triggered when an object of type <typeparamref name="T"/> is added to the collector.
/// </summary>
Event<IBehaviourCollector<T>, T> OnCollected { get; }
Event<IBehaviourCollector<T>, BehaviourCollectedArguments> OnCollected { get; }
/// <summary>
/// Event triggered when an object of type <typeparamref name="T"/> is removed from the collector.
/// </summary>
Event<IBehaviourCollector<T>, T> OnRemoved { get; }
Event<IBehaviourCollector<T>, BehaviourRemovedArguments> OnRemoved { get; }
/// <summary>
/// Amount of <typeparamref name="T"/> collected.
@@ -32,12 +32,11 @@ public interface IBehaviourCollector<T> : IHasUniverse where T : class
/// </summary>
/// <param name="sender">The instance of the <see cref="IBehaviourCollector{T}"/> that triggered the event.</param>
/// <param name="behaviourCollected">The object of type <typeparamref name="T"/> that was added to the collector.</param>
delegate void CollectedEventHandler(IBehaviourCollector<T> sender, T behaviourCollected);
readonly record struct BehaviourCollectedArguments(T BehaviourCollected);
/// <summary>
/// Delegate for handling the <see cref="OnRemoved"/> event.
/// </summary>
/// <param name="sender">The instance of the <see cref="IBehaviourCollector{T}"/> that triggered the event.</param>
/// <param name="behaviourRemoved">The object of type <typeparamref name="T"/> that was removed from the collector.</param>
delegate void RemovedEventHandler(IBehaviourCollector<T> sender, T behaviourRemoved);
/// <param name="BehaviourRemoved">The object of type <typeparamref name="T"/> that was removed from the collector.</param>
readonly record struct BehaviourRemovedArguments(T BehaviourRemoved);
}