perf!: behaviour controller memory allocation issues fixed by removing the enumerable interface
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Syntriax.Engine.Core;
|
||||
/// <summary>
|
||||
/// Represents a controller for managing <see cref="IBehaviour"/>s. Connected to an <see cref="IUniverseObject"/>.
|
||||
/// </summary>
|
||||
public interface IBehaviourController : IEntity, IHasUniverseObject, IEnumerable<IBehaviour>
|
||||
public interface IBehaviourController : IEntity, IHasUniverseObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when a <see cref="IBehaviour"/> is added to the <see cref="IBehaviourController"/>.
|
||||
@@ -17,6 +17,16 @@ public interface IBehaviourController : IEntity, IHasUniverseObject, IEnumerable
|
||||
/// </summary>
|
||||
event BehaviourRemovedEventHandler? OnBehaviourRemoved;
|
||||
|
||||
/// <summary>
|
||||
/// Amount of <see cref="IBehaviour"/> collected.
|
||||
/// </summary>
|
||||
int Count { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get a <see cref="IBehaviour"/> collected by it's index.
|
||||
/// </summary>
|
||||
IBehaviour this[System.Index index] { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="IBehaviour"/> to the <see cref="IBehaviourController"/>.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user