feat: IBehaviourController.GetBehaviours(List)
This commit is contained in:
@@ -70,6 +70,18 @@ public class BehaviourController : IBehaviourController
|
||||
return behaviours ?? Enumerable.Empty<T>().ToList();
|
||||
}
|
||||
|
||||
public void GetBehaviours<T>(List<T> behaviors)
|
||||
{
|
||||
behaviors.Clear();
|
||||
foreach (var behaviourItem in behaviours)
|
||||
{
|
||||
if (behaviourItem is not T _)
|
||||
continue;
|
||||
|
||||
behaviours.Add(behaviourItem);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveBehaviour<T>(bool removeAll = false) where T : class, IBehaviour
|
||||
{
|
||||
for (int i = behaviours.Count; i >= 0; i--)
|
||||
|
Reference in New Issue
Block a user