perf!: behaviour controller memory allocation issues fixed by removing the enumerable interface
This commit is contained in:
@@ -17,6 +17,8 @@ public class BehaviourController : BaseEntity, IBehaviourController
|
||||
private IUniverseObject _universeObject = null!;
|
||||
|
||||
public IUniverseObject UniverseObject => _universeObject;
|
||||
public int Count => behaviours.Count;
|
||||
public IBehaviour this[Index index] => behaviours[index];
|
||||
|
||||
public T AddBehaviour<T>(T behaviour) where T : class, IBehaviour
|
||||
{
|
||||
@@ -149,7 +151,4 @@ public class BehaviourController : BaseEntity, IBehaviourController
|
||||
behaviours.Remove(sender);
|
||||
InsertBehaviourByPriority(sender);
|
||||
}
|
||||
|
||||
public IEnumerator<IBehaviour> GetEnumerator() => behaviours.GetEnumerator();
|
||||
IEnumerator IEnumerable.GetEnumerator() => behaviours.GetEnumerator();
|
||||
}
|
||||
|
Reference in New Issue
Block a user