refactor: behaviour collector Count and indexer accessors added
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Syntriax.Engine.Core;
|
||||
|
||||
/// <summary>
|
||||
@@ -19,6 +17,16 @@ public interface IBehaviourCollector<T> : IHasUniverse where T : class
|
||||
/// </summary>
|
||||
event RemovedEventHandler? OnRemoved;
|
||||
|
||||
/// <summary>
|
||||
/// Amount of <typeparamref name="T"/> collected.
|
||||
/// </summary>
|
||||
int Count { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get a <typeparamref name="T"/> collected by it's index.
|
||||
/// </summary>
|
||||
T this[System.Index index] { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for handling the <see cref="OnCollected"/> event.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user