feat: IBehaviourController.CollectionMethod added

This commit is contained in:
2025-11-01 23:27:40 +03:00
parent 0bd2b0618d
commit 5f019892f1
3 changed files with 22 additions and 21 deletions

View File

@@ -58,9 +58,11 @@ public class BehaviourController : BaseEntity, IBehaviourController
return behaviours;
}
public void GetBehaviours<T>(IList<T> results)
public void GetBehaviours<T>(IList<T> results, IBehaviourController.CollectionMethod collectionMethod = IBehaviourController.CollectionMethod.Clear)
{
results.Clear();
if (collectionMethod == IBehaviourController.CollectionMethod.Clear)
results.Clear();
foreach (IBehaviour behaviourItem in behaviours)
{
if (behaviourItem is not T behaviour)