18 lines
		
	
	
		
			578 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			578 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using System;
 | 
						|
 | 
						|
namespace Engine.Core;
 | 
						|
 | 
						|
public class BehaviourCollector<T> : BehaviourCollectorBase<T> where T : class
 | 
						|
{
 | 
						|
    protected readonly FastList<T> behaviours = new(32);
 | 
						|
 | 
						|
    public override T this[Index index] => behaviours[index];
 | 
						|
    public override int Count => behaviours.Count;
 | 
						|
 | 
						|
    protected override void AddBehaviour(T behaviour) => behaviours.Add(behaviour);
 | 
						|
    protected override bool RemoveBehaviour(T tBehaviour) => behaviours.Remove(tBehaviour);
 | 
						|
 | 
						|
    public BehaviourCollector() { }
 | 
						|
    public BehaviourCollector(IUniverse universe) : base(universe) { }
 | 
						|
}
 |